summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorrobert-hh <robert@hammelrath.com>2021-12-09 08:44:26 +0100
committerrobert-hh <robert@hammelrath.com>2021-12-14 08:07:52 +0100
commitc5dbbf71c0021e03bf39aeedf31561be81b61978 (patch)
tree39a889c7e589e4d83b26ba0bc84c950d54eef9f7
parent64aa0bcb88cda556e77df4ab66d4005b1ec6a8e5 (diff)
downloadmicropython-c5dbbf71c0021e03bf39aeedf31561be81b61978.tar.gz
micropython-c5dbbf71c0021e03bf39aeedf31561be81b61978.zip
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.
-rw-r--r--ports/mimxrt/Makefile2
-rw-r--r--ports/mimxrt/hal/phy/device/phydp83848/fsl_phydp83848.c2
-rw-r--r--ports/mimxrt/mimxrt_flash.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/ports/mimxrt/Makefile b/ports/mimxrt/Makefile
index 574aebb4cd..680e87cac4 100644
--- a/ports/mimxrt/Makefile
+++ b/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
diff --git a/ports/mimxrt/hal/phy/device/phydp83848/fsl_phydp83848.c b/ports/mimxrt/hal/phy/device/phydp83848/fsl_phydp83848.c
index 0ef618d421..07ce6d1f7f 100644
--- a/ports/mimxrt/hal/phy/device/phydp83848/fsl_phydp83848.c
+++ b/ports/mimxrt/hal/phy/device/phydp83848/fsl_phydp83848.c
@@ -25,7 +25,7 @@
#define PHY_PHYSTS_LINK_MASK 0x0001U /*!< The PHY link up mask. */
#define PHY_RMII_MODE 0x20
-#define PHY_RMII_REV1_0 0x10
+#define PHY_RMII_REV1_0 0x10
/*! @brief Defines the timeout macro. */
#define PHY_READID_TIMEOUT_COUNT 1000U
diff --git a/ports/mimxrt/mimxrt_flash.c b/ports/mimxrt/mimxrt_flash.c
index 25a11ab7ca..27ab987ed1 100644
--- a/ports/mimxrt/mimxrt_flash.c
+++ b/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;