0

how to set the RAM start sddress of app and bootloader

piepie gravatar image

asked 2017-10-13 04:55:41 +0200

I am working on OTA DFU about nRF52810. My refernece project are ble_app_uart\pca10040\s132 and bootloader_secure_ble\pca10040 I find that the RAM start address between are different. This is the start RAM address of APP:

image description This is the start RAM address of bootloader:

image description

I am confusing why they are different? Is there anything I ignored? I am using SDK_14.0.0. How should I set the RAM start sddress of APP and bootloader? thx.

edit retag flag offensive close delete report spam

Comments

2 answers

Sort by » oldest newest most voted
1
hungbui gravatar image

answered 2017-10-13 11:15:17 +0200

Hi,

The start address of RAM varied depends on the application. Basically, we need to allocate enough RAM for the softdevice base on the configuration of the application, for example the number of vendor defined UUID, the number of connections it would support, the bandwidth of the connections. This result in different RAM start configuration of different application.

If you open log output when running application, you can find the recommended RAM start for each application.

edit flag offensive delete publish link more

Comments

thanks, Hung Bui.I got it. I do see the log. Now I understand. :)

piepie ( 2017-10-13 12:40:33 +0200 )editconvert to answer
0
huangjidong gravatar image

answered 2017-10-19 04:25:36 +0200

updated 2017-10-19 04:26:34 +0200

HI,piepie,

I'm doing something like you. But there is a place plagued me, nrf52810 the flash enough?

s132: 140kB

bootloader: 28KB (24KB dfu bootloader + 4kB bootloader setting)

ble_app_uart: 25KB

total:140+28+25 > 192KB

Do OTA also need double the app space, how do you solve this problem?

edit flag offensive delete publish link more

Comments

Hi Stayhungry, I thinke you can use S112 itstead of S132, which will save you quite much flash space. It is a alpha version for now and you can find it on the infocenter. Hope it helps :>

piepie ( 2017-10-19 04:42:14 +0200 )editconvert to answer

Thanks,guy. I have also considered S112, but it removed the function of the DLE, which makes me very embarrassing situation, because my needs must be high-speed, it seems that I can only give up the OTA.

Stayhungry ( 2017-10-19 04:45:58 +0200 )editconvert to answer

@stayhungry: You may want to reduce the size of the bootloader by using our legacy bootloader instead of using the secured one. Of course, you will lose the signing feature of the bootloader. But the legacy one is only about 12kB.

In addition, you can do single bank update (automatically selected in the bootloader, if the image size is larger than max dual bank limit) instead of dual bank.

This mean you can have about 36kB for the application. And can update 36kB new image.

Hung Bui ( 2017-10-19 09:08:11 +0200 )editconvert to answer

Thanks,Hung Bui.

Where can I find the legacy bootloader information?

If I use single bank update, it means that the risk of damage to the firmware in the DFU process is considered?

How to calculate the APP space is 36KB? 192 (flash size) - 140 (softdevice) - 12 (legacy bootloader) - 4 (bootloader setting) = 36KB?

Stayhungry ( 2017-10-19 14:28:34 +0200 )editconvert to answer

Hi,

Legacy bootloader is the bootloader we supported from SDK v6 until SDK v11. It won't be compatible with your current application+softdevice if you are using newer SDK.

But you can port it to the latest SDK. I don't see any big issue porting that example to newer SDK (and newer Softdevice).

Yes, I simply calculate application size as what you wrote. It could be smaller if you want to reserver application data.

Hung Bui ( 2017-10-19 15:25:05 +0200 )editconvert to answer

Thank you very much, your help is very useful.

Stayhungry ( 2017-10-19 15:47:55 +0200 )editconvert to answer

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

User menu

    or sign up

Recent questions

Question Tools

1 follower

Stats

Asked: 2017-10-13 04:55:41 +0200

Seen: 68 times

Last updated: 2 days ago