This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Hex file does not match with Segger and GCC. GCC produced hex does not work.

Hi,

I want to set up visual code studio for development. I was able to successfully run the blinky app on PCA10040 board and also emulated PCA10040e example. 

After this, I removed the "DEVELOP_IN_NRF52832" flag from makefile and also removed the define from the configuration but I am not able to see the device advertisement.

I flashed both softdevice and application using nrfstudio programmer but no success. 

Parents Reply Children
  • it fails right after reset at reset handler.

    Reset_Handler:
    
        /* Workaround for Errata 185 RAM: RAM corruption at extreme corners 
         * found at the Errata document for your device located
         * at https://infocenter.nordicsemi.com/index.jsp */
        
        LDR     R0, =0x10000130
        LDR     R0, [R0]

    It does not reach LDR R0,[R0]

    Debug window log: 

    Resetting target

    Program
    received signal SIGTRAP, Trace/breakpoint trap.
    HardFault_Handler () at ../../modules/nrfx/mdk/gcc_startup_nrf52810.S:323
    323 b .

  • Looks like there is nothing at LDR     R0, =0x10000130.

    So it is crashing. But this is all gcc generated file. Why it would fail. Do i need to do any settings in the makefile? 

  • Hi,

     

    Daniel said:

    Looks like there is nothing at LDR     R0, =0x10000130.

    So it is crashing. But this is all gcc generated file. Why it would fail. Do i need to do any settings in the makefile? 

     That is reading a specific address in the FICR space and performing an if on the value. Are you 100 % certain that this is where is faults?

    Could you please post your code, makefile etc, and the debug info wrt. the readout CPU registers? You can read the CPU registers using "mon regs" in gdb, if you're using that.

     

    Kind regards,

    Håkon

Related