Skip to content

Fix embedded example and ci and remove ardupilotmega feature - #346

Merged
patrickelectric merged 1 commit into
mavlink:masterfrom
pv42:issue-317
Jul 16, 2025
Merged

Fix embedded example and ci and remove ardupilotmega feature#346
patrickelectric merged 1 commit into
mavlink:masterfrom
pv42:issue-317

Conversation

@pv42

@pv42 pv42 commented Jul 3, 2025

Copy link
Copy Markdown
Contributor

Closed #317

Fixes for embedded:

  • fix memory.x by adding _stack_end
  • remove unused ardupilotmega dialect feature
  • fix CI test not using linker script link.x

@joaoantoniocardoso joaoantoniocardoso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a device to flash, but inspecting the built binary, all seems good:

arm-none-eabi-readelf -h target/thumbv7em-none-eabihf/release/mavlink-embedded
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           ARM
  Version:                           0x1
  Entry point address:               0x8000195
  Start of program headers:          52 (bytes into file)
  Start of section headers:          144020 (bytes into file)
  Flags:                             0x5000400, Version5 EABI, hard-float ABI
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         5
  Size of section headers:           40 (bytes)
  Number of section headers:         13
  Section header string table index: 11
arm-none-eabi-objdump -h target/thumbv7em-none-eabihf/release/mavlink-embedded

target/thumbv7em-none-eabihf/release/mavlink-embedded:     file format elf32-littlearm

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .vector_table 00000194  08000000  08000000  00010000  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  1 .text         00004328  08000194  08000194  00010194  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  2 .rodata       00000a00  080044bc  080044bc  000144bc  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  3 .data         00000000  20000000  20000000  00014ebc  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  4 .gnu.sgstubs  00000000  08004ec0  08004ec0  00014ec0  2**5
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  5 .bss          00000004  20000000  20000000  00020000  2**2
                  ALLOC
  6 .uninit       00000000  20000004  20000004  00020000  2**2
                  ALLOC
  7 .comment      0000008b  00000000  00000000  00020000  2**0
                  CONTENTS, READONLY
  8 .ARM.attributes 00000038  00000000  00000000  0002008b  2**0
                  CONTENTS, READONLY
cargo size --release --target thumbv7em-none-eabihf -- -A
    Finished `release` profile [optimized] target(s) in 0.01s
mavlink-embedded  :
section              size        addr
.vector_table         404   0x8000000
.text               17192   0x8000194
.rodata              2560   0x80044bc
.data                   0  0x20000000
.gnu.sgstubs            0   0x8004ec0
.bss                    4  0x20000000
.uninit                 0  0x20000004
.comment              139         0x0
.ARM.attributes        56         0x0
Total               20355

@onur-ozkan onur-ozkan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a nit, otherwise LGTM

Comment thread mavlink/examples/embedded/Cargo.toml Outdated
@patrickelectric

Copy link
Copy Markdown
Member

I can test on the real hardware during the weekend

@onur-ozkan

Copy link
Copy Markdown
Member

Have you done the test, or we should just merge this? The change looks fairly good to me and it can't be more broken than the status quo.

@patrickelectric patrickelectric left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just lost my board, no idea where it's 🫤

@patrickelectric
patrickelectric merged commit f7090c4 into mavlink:master Jul 16, 2025
45 checks passed
@pv42
pv42 deleted the issue-317 branch September 2, 2025 17:11
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.

embedded example does not build

4 participants