Skip to content

fix(boards): use the full 256K SRAM on F412 cannodes - #28498

Merged
dakejahl merged 1 commit into
dakejahl/can-flow-mr-f412vgfrom
dakejahl/f412-sram-end
Sep 3, 2026
Merged

fix(boards): use the full 256K SRAM on F412 cannodes#28498
dakejahl merged 1 commit into
dakejahl/can-flow-mr-f412vgfrom
dakejahl/f412-sram-end

Conversation

@dakejahl

@dakejahl dakejahl commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Open the cannode linker SRAM region to 256K so .data/.bss can use the upper 64K. NuttX 12.12 already ends the F412 heap at 0x20040000 (PX4/NuttX#407).

Stacked on #28456.

Problem

The board linker scripts still described the F42x 192K split, so .data/.bss could not use the upper 64K.

Solution

Set sram LENGTH to 256K on the ARK F412 cannodes (VG/CG from #28456 and the remaining CE boards, which have the same 256K SRAM).

@github-actions github-actions Bot added the kind:bug Something is broken or behaving incorrectly. label Sep 1, 2026
@github-actions github-actions Bot added scope:dependencies Dependency or submodule updates. scope:boards Board-specific changes or hardware definitions. labels Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🔎 FLASH Analysis

px4_fmu-v5x [Total VM Diff: -24 byte (-0 %)]
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%     +55  [ = ]       0    .debug_abbrev
  -0.0%      -2  [ = ]       0    .debug_info
  -0.0%      -5  [ = ]       0    .debug_line
     +50%      +2  [ = ]       0    [Unmapped]
    -0.0%      -7  [ = ]       0    [section .debug_line]
  +0.3%     +24  [ = ]       0    [Unmapped]
  -0.0%     -24  -0.0%     -24    .text
     +44%      +4   +44%      +4    g_nullstring
    -0.0%     -28  -0.0%     -28    [section .text]
  +0.0%     +48  -0.0%     -24    TOTAL

px4_fmu-v6x [Total VM Diff: -24 byte (-0 %)]
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%     +55  [ = ]       0    .debug_abbrev
  -0.0%      -2  [ = ]       0    .debug_info
  -0.0%      -5  [ = ]       0    .debug_line
     +50%      +2  [ = ]       0    [Unmapped]
    -0.0%      -7  [ = ]       0    [section .debug_line]
  +0.6%     +24  [ = ]       0    [Unmapped]
  -0.0%     -24  -0.0%     -24    .text
     +44%      +4   +44%      +4    g_nullstring
    -0.0%     -28  -0.0%     -28    [section .text]
  +0.0%     +48  -0.0%     -24    TOTAL

Updated: 2026-09-03T22:07:12

@dakejahl
dakejahl force-pushed the dakejahl/f412-sram-end branch from 085420a to 2ba2a1a Compare September 2, 2026 16:48
@dakejahl
dakejahl marked this pull request as draft September 2, 2026 19:43
NuttX now ends the F412 heap at 0x20040000. The linker scripts still
capped .data/.bss at 192K, leftover from the F42x split.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
@dakejahl
dakejahl force-pushed the dakejahl/can-flow-mr-f412vg branch from 5c9ae91 to 7a9a76c Compare September 3, 2026 21:54
@dakejahl
dakejahl force-pushed the dakejahl/f412-sram-end branch from 2ba2a1a to 917d745 Compare September 3, 2026 21:54
@dakejahl
dakejahl marked this pull request as ready for review September 3, 2026 21:54
@dakejahl
dakejahl merged commit f73f2d3 into dakejahl/can-flow-mr-f412vg Sep 3, 2026
72 checks passed
@dakejahl
dakejahl deleted the dakejahl/f412-sram-end branch September 3, 2026 22:28
dakejahl added a commit that referenced this pull request Sep 4, 2026
…K cannodes (#28456)

* fix(can-flow-mr): use STM32F412VG and 960K of app flash

The part is STM32F412VGH6 (100-pin, 1MB), not the 48-pin 512KB CE.
App flash starts at 0x08010000 after the 64K bootloader+params window,
so the region is 960K, not 928K.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* fix(boards): select STM32F412VG on the 100-pin 1MB ARK cannodes

Teseo, X20, F9P, and Septentrio/MOSAIC/G5 GPS modules use
STM32F412VGH6, same as Flow MR. They were still selecting the
48-pin 512KB CE and a 928K app region that double-counted params.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* fix(ark/cannode): use STM32F412CG and 960K of app flash

The part is STM32F412CGU6, not the 512KB CE. App flash starts at
0x08010000 after the 64K bootloader+params window, so the region is
960K, not 928K.

* fix(ark/mag): use STM32F412VG and 960K of app flash

The part is STM32F412VGH6, not the 48-pin 512KB CE, and the app region
after the 64K bootloader+params reservation is 960K, not 928K.

* docs(boards): fix the F412 SRAM description in the cannode linker scripts

The F412 has one contiguous 256KB SRAM at 0x20000000. The block list
these scripts carried is F42x boilerplate and describes memory the part
does not have.

* fix(ark/dist): use STM32F412VG and 960K of app flash

The part is STM32F412VGH6, not the 48-pin 512KB CE. App flash starts at
0x08010000 after the 64K bootloader+params window, so the region is
960K, not 928K.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* fix(boards): give F412 cannodes a 256K SRAM region (#28498)

NuttX now ends the F412 heap at 0x20040000. The linker scripts still
capped .data/.bss at 192K, leftover from the F42x split.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* docs(boards): fix the F412 SRAM description on the 512K ARK cannodes

The F412 has one contiguous 256KB SRAM at 0x20000000. The block list
these scripts carried is F42x boilerplate and describes memory the part
does not have.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* fix(ark/cannode): drop the PH1 boot jumper defines

PH1 is OSC_OUT for the HSE crystal. The jumper option was already
undefined, so these defines could not be enabled without stopping
the clock.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* fix(boards): correct ARK cannode I2C bitbang pins

The bitbang GPIO defines did not match the schematic nets, so a bus reset would drive the wrong pins.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

---------

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:bug Something is broken or behaving incorrectly. scope:boards Board-specific changes or hardware definitions. scope:dependencies Dependency or submodule updates.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant