bootloader makefile
Closed this issue ยท 5 comments
mahdi259 commented
Hi
I appreciate utilization of parameters in bootloader image generator. Unfortunately some parameters are not recognized and I'm not able to change them in make command. Any idea?
make USER_FLAGS+=-DUART_BAUD=115200 USER_FLAGS+=-SPI_FLASH_SECTOR_SIZE=4096 clean_all bootloader
And the result is:
/content/neorv32/sw/bootloader
riscv32-unknown-elf-gcc: error: unrecognized command-line option '-SPI_FLASH_SECTOR_SIZE=4096'
make: *** [../../sw/common/common.mk:172: bootloader.c.o] Error 1
stnolting commented
You need to put a -D
in front of each define that you want to alter. Just add this to your SPI flash definition and it should work:
make USER_FLAGS+=-DUART_BAUD=115200 USER_FLAGS+=-DSPI_FLASH_SECTOR_SIZE=4096 clean_all bootloader
mahdi259 commented
Thanks a lot
mahdi259 commented
May I ask what -D
does?
stnolting commented
It is just a GCC preprocessor flag: https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html
It basically (re-)defines a #define
.
mahdi259 commented
Thanks a lot