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

Use flash algorithm, add linker sections, remove erase_all #21

Closed
wants to merge 2 commits into from

Conversation

9names
Copy link
Member

@9names 9names commented Feb 12, 2024

Builds on #19, but turns off default features of flash_algorithm to allow removal of the unimplemented erase_all function.

Resolves #14 by added the requisite sections.

$ python scripts/generate_blobs.py ~/flash-algo/target/thumbv6m-none-eabi/release/flash-algo
Flash Device:
  name=b''
  version=0x0
  type=5
  start=0x10000000
  size=0x1000000
  page_size=0x100
  value_empty=0xff
  prog_timeout_ms=1000
  erase_timeout_ms=2000
  sectors:
    start=0x10000000, size=0x1000

$ arm-none-eabi-objdump -h target/thumbv6m-none-eabi/release/flash-algo

target/thumbv6m-none-eabi/release/flash-algo:     file format elf32-littlearm

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 PrgCode       000001c0  00000000  00000000  000000b4  2**2
                  CONTENTS, ALLOC, LOAD, CODE
  1 PrgData       00000004  000001c0  000001c0  00000274  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  2 DevDscr       000000b0  000001c4  000001c4  00000278  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
                  
$ arm-none-eabi-objdump -t target/thumbv6m-none-eabi/release/flash-algo

target/thumbv6m-none-eabi/release/flash-algo:     file format elf32-littlearm

SYMBOL TABLE:
00000000 l    df *ABS*  00000000 flash_algo.a9f41f0df4cef4a-cgu.0
000001a0 l     F PrgCode        00000008 _ZN4core9panicking9panic_fmt17hd2523d0706fb7bbcE
000001a8 l     O PrgCode        00000001 _ZN10flash_algo8_IS_INIT17h3b044e184bd717b2E.0
000001b8 l     O PrgCode        00000004 _ZN10flash_algo14_ALGO_INSTANCE17hefe569ff8b9fd3c4E.4
000001bc l     O PrgCode        00000004 _ZN10flash_algo14_ALGO_INSTANCE17hefe569ff8b9fd3c4E.5
000001b0 l     O PrgCode        00000004 _ZN10flash_algo14_ALGO_INSTANCE17hefe569ff8b9fd3c4E.2
000001ac l     O PrgCode        00000004 _ZN10flash_algo14_ALGO_INSTANCE17hefe569ff8b9fd3c4E.0
000001b4 l     O PrgCode        00000004 _ZN10flash_algo14_ALGO_INSTANCE17hefe569ff8b9fd3c4E.3
00000138 g     F PrgCode        00000034 EraseSector
000001c4 g     O DevDscr        000000b0 FlashDevice
00000000 g     F PrgCode        00000104 Init
000001c0 g     O PrgData        00000004 PRGDATA_Start
0000016c g     F PrgCode        00000034 ProgramPage
00000104 g     F PrgCode        00000034 UnInit

thejpster and others added 2 commits February 12, 2024 22:38
I wasn't sure what the error code should be for ROM Func load failure.
@9names 9names marked this pull request as draft February 18, 2024 11:56
@9names 9names force-pushed the use-flash-algorithm-plus-sections branch from d138504 to ddd9708 Compare February 18, 2024 12:11
@9names
Copy link
Member Author

9names commented Feb 18, 2024

Going to pull the parts of this into different PRs

@9names 9names closed this Feb 18, 2024
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

Successfully merging this pull request may close these issues.

2 participants