.text section too large – How to reduce flash usage in nRF52833 (SES + SDK)?

I am using nRF52833 PCA10100 board. While trying to run sample ble code in segger embedded studio, I am frequently facing this error which says, .text file is larger than specified size. What should I do? The nrf5sdk already have less example code for pca10100, even blinky is not available. When I try with the available sample code like ble-uart, this error is happening.

Parents
  • Hi, 

    Have you managed to run any BLE example made for PCA10100 ? For example the ble_app_uart ? Did you make any modification ? 

    When I build the ble_app_uart for PCA10100 I have this memory result: 

    So there still lots of space in the flash and the text area is not occupied much. You may have to double check if there is any wrong configuration. 

    The flash size of the nRF52833 is limited (512kB) so you may want to consider using S113 softdevice (which is smaller size than S140) if the flash size is not enough. 

  • Hi, Thank you for responding. Since normal blinky was not available for PCA10100, I tried with the ble_app_uart itself. There were some error saying unknown type name'_ printf_tag.ptr' which was in this line

     int __putchar(int ch, __printf_tag_ptr tag_ptr)

    So I removed it. After that in 'retarget.c ' another error came which was for an unterminated #if, I added a #endif to remove the error. After that this error started. I first tried with s140 but then changed to s113 for reducing the size. But still the error persists.

  • Hi, 

    My suggestion is to try compare the difference between the ble_app_uart_pca10056_s140.emProject and the ble_app_uart_pca10100_s140.emProject file in the ble_app_uart project so you know what change needed to add to convert the ble_app_blinky_pca10056_s140.emProject to support PCA10100. 

    You can use any text compare tool for the job. For example you can use Notepad++ with the compare plug in. 

  • I opened both of them. The code is actually same for both. The difference is only in the preprocessor definition. Rest are all same. I tried building both of them and I see the same error.

    Everytime I am building, I see new error. I have a doubt, even if it's the memory issue, shouldn't it occur during flashing. These errors are coming while building itself. I haven't been able to built any project. Can you tell me step by step how you build and flash the program. Maybe I am making error in steps

Reply
  • I opened both of them. The code is actually same for both. The difference is only in the preprocessor definition. Rest are all same. I tried building both of them and I see the same error.

    Everytime I am building, I see new error. I have a doubt, even if it's the memory issue, shouldn't it occur during flashing. These errors are coming while building itself. I haven't been able to built any project. Can you tell me step by step how you build and flash the program. Maybe I am making error in steps

Children
No Data
Related