Skip to content

Commit 7921718

Browse files
committed
updated linkerscript to show correct sizes + added profiles location (for lpc1756)
1 parent 2f95e27 commit 7921718

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

linkerscript.ld

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ Memories definitions
1717
*/
1818
MEMORY
1919
{
20-
rom (rx) : org = 0x00000000 + 8k, len = 256k
20+
rom (rx) : org = 0x00000000 + 8k, len = 256k - 8k - 32k
21+
profiles (r) : org = 0x00000000 + 256k - 32k, len = 32k
2122
ram (rwx) : org = 0x10000000, len = 16k
2223
ram1 (rwx) : org = 0x2007C000, len = 16k
2324
}

main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ int main() {
142142
using flash = target::io::flash;
143143

144144
// the range where we store the keys is 0x38000 - 0x40000
145+
// TODO: use the region from the linkerscript
145146
constexpr static uint32_t key_start = 0x38000;
146147
constexpr static uint32_t key_end = 0x40000;
147148

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Additional pictures can be found [here](./img/)
2828
* support for different intervals
2929
* support for 8 digit keys
3030
* add support for more than 32 profiles (needs a rework if more profiles are required. The profiles are copied to ram and there is not enough for more at the moment. If we leave them in flash we can store a lot more)
31+
* support for reading the profile locations from the linkerscript instead of hardcoded
3132

3233
### Compiling
3334
TOTP uses [klib](https://github.com/itzandroidtab/klib). This repo can be cloned in the klib project folder. See [build.yml](./.github/workflows/build.yml) for more info on compiling this project.

0 commit comments

Comments
 (0)