Hello everyone,
I am facing a problem using MIMXRT1060-EVK, which contains an MIMXRT1062DVL6A.
I am trying to execute a simple example: SDK_PATH/boards/evkmimxrt1060/demo_apps/led_blinky
I use GCC (gcc-arm-none-eabi-8-2018-q4-major) as toolchain, and SDK_2.6.2_EVK-MIMXRT1060_for_gcc as SDK.
When I use provided ./armgcc/build_flexspi_nor_release.sh, it builds fine, and I am able to flash it on EVK at adress 0x60000000 using a Segger JLink base probe, and it runs fine.
We already have a makefile compilation system, so I would like to use it, and to avoid using MUXpresso IDE or other external tool.
I am able to build the example, building the same files, linking the same (flags extracted from CMake previous compilation), both in release and debug.
When I launch the debug or release binary with the debugger (using MCUXpresso - just for debug), it works, the led blinks.
When I flash the release binary, using the Segger tool (not using MCUxpresso debug session), nothing happens, it does not work, even after a reset.
I am not familiar with NXP chip, but I have a good background in ST ones, and so in Cortex M chips.
I seems that the debugger does something needed by the release binary, but I don't know what.
- I tried several things:
- flashing at different adress (0x00000000)
- playing with boot modes
- using my own linker files - used for ST Cortex M4 chips (adapted for imx chip addresses)
- using exactly the same cflags/asmflasg/ldflags as the cmake example
- reduce built files to a minimum needed (with minor changes to enable build):
- boards/evkmimxrt1060/demo_apps/led_blinky/board.c
- boards/evkmimxrt1060/demo_apps/led_blinky/clock_config.c
- boards/evkmimxrt1060/demo_apps/led_blinky/pin_mux.c
- boards/evkmimxrt1060/demo_apps/led_blinky/led_blinky.c
- devices/MIMXRT1062/drivers/fsl_gpio.c
- devices/MIMXRT1062/drivers/fsl_clock.c
- devices/MIMXRT1062/system_MIMXRT1062.c
- using the same flags I used for building M4 chips (adapted flags regarding M core)
In each case, the debug session runs fine, but flashing release binary with segger tool does not.
I am a bit lost...
Attached flags I am currently using (which I use with success on other Cortex M projects)
I am currently using MIMXRT1062xxxxx_flexspi_nor.ld as linker file (as MIMXRT1062xxxxx_ram.ld does not work in any case, even building using provided cmake scripts)
Help appreciated !
Thanks,
Camille