Skip to content
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

nRF52840 Invalid App RAM Start config #516

Open
nguyenlkdn opened this issue Sep 28, 2023 · 1 comment
Open

nRF52840 Invalid App RAM Start config #516

nguyenlkdn opened this issue Sep 28, 2023 · 1 comment

Comments

@nguyenlkdn
Copy link

nguyenlkdn commented Sep 28, 2023

https://github.com/tock/libtock-rs/blob/master/build_scripts/src/lib.rs#L18
("nrf52840" , "0x00030000", "0x00D0000", "0x20008000", "46K" ),

But in Kernel already used to >0x200081D4

> Initialization complete. Entering main loop
> NRF52 HW INFO: Variant: AAD0, Part: N52840, Package: QI, Ram: K256, Flash: K1024
> tock$ kernel
> Kernel version: 2.1 (build release-2.1-2012-g7ad7d1b4e)
> 
>  ╔═══════════╤══════════════════════════════╗
>  ║  Address  │ Region Name    Used (bytes)  ║
>  ╚0x200081D4═╪══════════════════════════════╝
>              │   BSS         25028
>   0x20002004 ┼─────────────────────────────── S
>              │   Relocate        4            R
>   0x20002000 ┼─────────────────────────────── A
>              │ ▼ Stack        8192            M
>   0x20000000 ┼───────────────────────────────
>              .....
>   0x0002E000 ┼─────────────────────────────── F
>              │   RoData      38992            L
>   0x000247B0 ┼─────────────────────────────── A
>              │   Code       149424            S
>   0x00000000 ┼─────────────────────────────── H

with above config, after installed leds sample application, it doens't work.
after i changed build_scripts/src/lib.rs
("nrf52840" , "0x00030000", "0x00D0000", "0x20009000", "46K" ),
It is able to work well.

So how can we know exactly OS(RAM, ROM) enough size for TockOS v2.1

@bradjc
Copy link
Contributor

bradjc commented Sep 28, 2023

This is a definite pain point. You have the right fix to move the start of ram to a higher address.

Until we have suitable PIC support in LLVM there isn't much we can do. My temporary best alternative is in #509. We can compile for many candidate addresses and let tockloader decide which one to actually use.

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

2 participants