I was developing a bare-metal firmware for RAK3172 with STM32CubeWL starting with a CubeMX generated template.
I realized, RUI3 works a lot better (missed downlinks with CubeMX firmware) and would simplify a lot of things as I could make use of Arduino libraries etc.
Still, I want to use my IDE of choice (CLion) with debugger and my probe (STLink/SWD or CMSIS-DAP Probe).
Setting up the CMake project with GitHub - a9183756-gh/Arduino-CMake-Toolchain: CMake toolchain for all Arduino compatible boards worked fine, also the binaries work when flashing with STM32CubeProgrammer and selecting “run after programming”.
Yet if I just boot up the MCU, it seems to be jumping to 0x0, whereas the correct startup vector should be somewhere here:
Remote target using gdb-specific protocol:
Sensor_RUI3.elf’, file type elf32-littlearm.
Entry point: 0x8007740
0x08006000 - 0x08006138 is .isr_vector
0x08006140 - 0x0801e1b0 is .text
0x0801e1b0 - 0x0801f4c0 is .rodata
0x0801f4c0 - 0x0801f4c8 is .ARM
0x0801f4c8 - 0x0801f4c8 is .preinit_array
0x0801f4c8 - 0x0801f4d8 is .init_array
0x0801f4d8 - 0x0801f4e0 is .fini_array
0x20000000 - 0x200004b0 is .data
0x200004b0 - 0x200061b0 is .bss
0x200061b0 - 0x20009fb0 is ._user_heap_stack
If I exchange the content of “flash_stm32wle5xx.ld” linker script with my bare-metal one, the main() of rui_inner_main.c gets called, but crashes at initializing the RTC…
My suspicion is this is because RUI3 is expecting some kind of custom bootloader I do not deploy?
Is there anything else I could try?
