Browse Source

mimxrt: Use -Og instead of -O0 for DEBUG builds.

Thanks for the hint, Damien. The DEBUG build got very large recently.
The major difference is, that inline function are now inlined and
not included as a function. That's good and maybe bad. The good thing is,
that the code speed si now close to the final code. It could be worse
in single step debugging. I'll see.

Setting this option caused a new warning and a formatting error
to pop up at different places. Fixed as well.
pull/8051/head
robert-hh 3 years ago
parent
commit
c5dbbf71c0
  1. 2
      ports/mimxrt/Makefile
  2. 2
      ports/mimxrt/mimxrt_flash.c

2
ports/mimxrt/Makefile

@ -125,7 +125,7 @@ LIBS = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
# Tune for Debugging or Optimization
ifeq ($(DEBUG),1)
CFLAGS += -O0 -ggdb
CFLAGS += -Og -ggdb
LDFLAGS += --gc-sections
CFLAGS += -fdata-sections -ffunction-sections
else

2
ports/mimxrt/mimxrt_flash.c

@ -79,7 +79,7 @@ status_t flash_erase_block(uint32_t erase_addr) {
// the vfs driver takes care for erasing the sector if required
status_t flash_write_block(uint32_t dest_addr, const uint8_t *src, uint32_t length) __attribute__((section(".ram_functions")));
status_t flash_write_block(uint32_t dest_addr, const uint8_t *src, uint32_t length) {
status_t status;
status_t status = 0;
uint32_t size;
uint32_t next_addr;

Loading…
Cancel
Save