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

Getting build errors after adding app_uart_fifo.c

Hi,

I had a building project until I added app_uart_fifo.c. The app fifo and uart flags are enabled in the sdk_config.h. This is a custom board. Now when I build I get the following errors:


    Output/Debug/Exe/TagIt.elf section `.nrf_balloc' will not fit in region `UNPLACED_SECTIONS'
    region `UNPLACED_SECTIONS' overflowed by 28 bytes
    Output/TagIt Debug/Obj/app_error_weak.o: in function `app_error_fault_handler':
    undefined reference to `__start_log_const_data'
    Output/TagIt Debug/Obj/nrf_log_frontend.o: in function `nrf_log_frontend_dequeue':
    undefined reference to `__start_log_const_data'
Build failed

Parents Reply Children
  • So I added sections for the log data and that got rid of the undefined reference. Not sure if it's the correct way to go about it though. I'm still getting the unplaced sections error. Since they are "unplaced" how do I change my sections to accommodate the .nrf_balloc? Or do I add the .nrf_balloc section somewhere explicitly? Here is my flash placement file.

    <!DOCTYPE Linker_Placement_File>
    <Root name="Flash Section Placement">
      <MemorySegment name="$(FLASH_NAME:FLASH)">
        <ProgramSection alignment="0x100" load="Yes" name=".vectors" start="$(FLASH_START:)" />
    	<!--<ProgramSection alignment="4" load="Yes" name="fs_data" />-->
        <ProgramSection alignment="4" load="Yes" name=".init" />
        <ProgramSection alignment="4" load="Yes" name=".init_rodata" />
        <ProgramSection alignment="4" load="Yes" name=".text" />
        <ProgramSection alignment="4" load="Yes" name=".dtors" />
        <ProgramSection alignment="4" load="Yes" name=".ctors" />
        <ProgramSection alignment="4" load="Yes" name=".rodata" />
        <ProgramSection alignment="4" load="Yes" name=".ARM.exidx" address_symbol="__exidx_start" end_symbol="__exidx_end" />
        <ProgramSection alignment="4" load="Yes" runin=".fast_run" name=".fast" />
        <ProgramSection alignment="4" load="Yes" runin=".data_run" name=".data" />
        <ProgramSection alignment="4" load="Yes" runin=".tdata_run" name=".tdata" />
        <ProgramSection alignment="4" keep="Yes" load="No" name=".nrf_sections" address_symbol="__start_nrf_sections" />
    	<ProgramSection alignment="4" keep="Yes" load="Yes" runin=".log_data_run" name=".log_data" />
      </MemorySegment>
      <MemorySegment name="$(RAM_NAME:RAM);SRAM">
        <ProgramSection alignment="0x100" load="No" name=".vectors_ram" start="$(RAM_START:$(SRAM_START:))" />
        <ProgramSection alignment="4" keep="Yes" load="No" name=".nrf_sections_run" address_symbol="__start_nrf_sections_run" />
        <ProgramSection alignment="4" keep="Yes" load="No" name=".nrf_sections_run_end" address_symbol="__end_nrf_sections_run" />
        <ProgramSection alignment="4" load="No" name=".fast_run" />
        <ProgramSection alignment="4" load="No" name=".data_run" />
        <ProgramSection alignment="4" load="No" name=".bss" />
        <ProgramSection alignment="4" load="No" name=".tbss" />
        <ProgramSection alignment="4" load="No" name=".tdata_run" />
        <ProgramSection alignment="4" load="No" name=".non_init" />
    	<ProgramSection alignment="4" keep="Yes" load="Yes" name=".log_data_run" address_symbol="__start_log_const_data"  end_symbol="__stop_log_const_data" />
        <ProgramSection alignment="4" size="__HEAPSIZE__" load="No" name=".heap" />
        <ProgramSection alignment="8" size="__STACKSIZE__" load="No" place_from_segment_end="Yes" name=".stack" />
        <ProgramSection alignment="8" size="__STACKSIZE_PROCESS__" load="No" name=".stack_process" />
      </MemorySegment>
      <MemorySegment name="$(FLASH2_NAME:FLASH2)">
        <ProgramSection alignment="4" load="Yes" name=".text2" />
        <ProgramSection alignment="4" load="Yes" name=".rodata2" />
        <ProgramSection alignment="4" load="Yes" runin=".data2_run" name=".data2" />
      </MemorySegment>
      <MemorySegment name="$(RAM2_NAME:RAM2)">
        <ProgramSection alignment="4" load="No" name=".data2_run" />
        <ProgramSection alignment="4" load="No" name=".bss2" />
      </MemorySegment>
    </Root>
    

  • Yes, adding the .nrf_balloc and then .log_const_data_app to the flash placement solved the remaining issues.

Related