-
Hi @stnolting |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
The SPI module is just another interface. You can use it to read/write data from/to an external flash, but you still need some program memory where the code is stored that actually generates these SPI accesses. In setups with the bootloader enabled, the bootloader code can transfer an entire program image from the flash into IMEM using the SPI module. Hence, an internal memory (RAM) is required. In contrast, the XIP module can be used to transform CPU accesses into flash accesses transparently. No additional code memory is needed in this case. But these accesses are read-only. In both cases you still need some RAM (for the stack etc) which is implemented by the DMEM. Furthermore, DMEM is just RAM that can also be used to store/execute instruction code. So the processor can also run with DMEM alone (no dedicated IMEM), but this requires some makefile adjustments. |
Beta Was this translation helpful? Give feedback.
-
After some modifications in common.mk and image_gen.c, I generated neorv32_exe.mem with the header files you mentioned and neorv32_xip_exe.mem without headers. This way I didn't enable IMEM at all! |
Beta Was this translation helpful? Give feedback.
The "raw" files only contain the plain executable without any neorv32-specific bootloader header.
See 📚 4.4.4. Executable Image Generator:
In your screenshot it looks like your are using a file with this bootloader header - the header data gets interpreted as instructions causing illegal instruction exception ("
ERR_EXC 0x00000002
").