Skip to content

Load application address other than 0x1000 #6968

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ymallik opened this issue Dec 31, 2019 · 4 comments
Closed

Load application address other than 0x1000 #6968

ymallik opened this issue Dec 31, 2019 · 4 comments

Comments

@ymallik
Copy link

ymallik commented Dec 31, 2019

Hi Team,

Need a clarification on how to load the application other than 0x1000 address. By default, bootloader loads the application starting at 0x1000.

Now, we want to load the application at 0x2000. For this, we modified the bootloader code. We made below changes in flash.h file, rebuilt the bootloader code.

#define APP_START_OFFSET 0x2000 //0x1000

Now, we flashed the application code at 0x2000, but the application doesn't start.

Do we need to make any other changes in the bootloader code?

Best regards
Malli

@devyte
Copy link
Collaborator

devyte commented Dec 31, 2019

flashed the application at 0x2000

how? why? our build system makes a unified binary that includes the bootloader at 0x0. If you flash the binary at 0x2000, it won't work.
I think you also have to change linker settings to link your modified bootloader at 0x0 and the app at 0x2000, and flash as usual at 0x0.

Closing because non compliant, but I'm interested in knowing the details if you manage this. Our own boot sector is almost full, but we might have to put more functionality into it, which means moving the app to 0x2000 if it all doesn't fit.

@devyte devyte closed this as completed Dec 31, 2019
@ymallik
Copy link
Author

ymallik commented Dec 31, 2019

Hi team,

Thank you for the information.

We want to do OTA in Arduino environment and we need to maintain both old and new firmware in the flash. Based on the configuration parameters, we will switch to either old or new firmware.

In examples, httpupdate, new firmware overwrites the old firmware.

Any ideas, how to implement this in arduino?

Best regards
Malli

@devyte
Copy link
Collaborator

devyte commented Dec 31, 2019

I think that has been discussed in #905

@earlephilhower
Copy link
Collaborator

rboot is probably your best bet. We don't use it, but it has support for app slots.

https://github.com/raburton/rboot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants