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

Hex file compiled by GCC not working

I have a custom board with the nRF51822 QFAA. Schematic:

image description

In order to compile the firmware, I'm using MinGW. As you can see, I'm also using the SDK 12.3.0.

image description

Finally, in order to upload the .hex generated by the Makefile in /_build, I'm using SEGGER J-Flash Lite:

image description

Until here, everything works fine (Perfect compilation + programming). But the program is not working at all. I chose the ble_app_hrs example.

In order to debug, as I have 2 LEDs, I tried to do a simple blinking at the beginning of the main:

int main(void){
uint32_t err_code;
bool     erase_bonds;
nrf_gpio_cfg_output(28);
nrf_gpio_cfg_output(30);
nrf_gpio_pin_clear(30);
nrf_gpio_pin_clear(28);
	for(;;){
		nrf_gpio_pin_clear(30);
		nrf_gpio_pin_clear(28);
		nrf_delay_ms(500);
		nrf_gpio_pin_set(30);
		nrf_gpio_pin_set(28);
		nrf_delay_ms(500);
	}

But still, It's not working. I've already spent a long time with this and I'm running out of ideas. Could somebody possibly propose me a solution for this?

Parents
  • Hi, the SDK examples are configured for the xxAC variant that has 32K of RAM. You can change the RAM allocation in ble_app_hrs_gcc_nrf51.ld to ensure that RAM usage doesn't exceed the 16K boundary:

    RAM (rwx) :  ORIGIN = 0x20001fe8, LENGTH = 0x2018
    
  • Still not working, but thank you, I completely forgot about this issue

Reply Children
No Data