Skip to content

Commit

Permalink
Test and override of LD_MAX_SIZE
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Aug 4, 2021
1 parent 1d661b0 commit b15fc4a
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 21 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/test-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,16 @@ jobs:

#- STM32F103RC_btt_maple
- STM32F103RC_btt_USB_maple
- STM32F103RC_fysetc
- STM32F103RC_fysetc_maple
- STM32F103RC_meeb
- jgaurora_a5s_a1
- STM32F103VE_longer
- jgaurora_a5s_a1_maple
- STM32F103VE_longer_maple
#- mks_robin_maple
- mks_robin_lite
- mks_robin_pro
- mks_robin_lite_maple
- mks_robin_pro_maple
#- mks_robin_nano35_maple
#- STM32F103RET6_creality_maple
- STM32F103VE_ZM3E4V2_USB_maple

# STM32 (ST) Environments

Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/pins/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -562,11 +562,11 @@
#elif MB(MINGDA_MPX_ARM_MINI)
#include "stm32f1/pins_MINGDA_MPX_ARM_MINI.h" // STM32F1 env:mingda_mpx_arm_mini
#elif MB(ZONESTAR_ZM3E2)
#include "stm32f1/pins_ZM3E2_V1_0.h" // STM32F1 env:STM32F103RC_ZM3E2_USB
#include "stm32f1/pins_ZM3E2_V1_0.h" // STM32F1 env:STM32F103RC_ZM3E2_USB_maple
#elif MB(ZONESTAR_ZM3E4)
#include "stm32f1/pins_ZM3E4_V1_0.h" // STM32F1 env:STM32F103VC_ZM3E4_USB
#include "stm32f1/pins_ZM3E4_V1_0.h" // STM32F1 env:STM32F103VC_ZM3E4_USB_maple
#elif MB(ZONESTAR_ZM3E4V2)
#include "stm32f1/pins_ZM3E4_V2_0.h" // STM32F1 env:STM32F103VE_ZM3E4V2_USB
#include "stm32f1/pins_ZM3E4_V2_0.h" // STM32F1 env:STM32F103VE_ZM3E4V2_USB_maple

//
// ARM Cortex-M4F
Expand Down
2 changes: 2 additions & 0 deletions buildroot/share/PlatformIO/scripts/offset_and_rename.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
env["LINKFLAGS"][i] = "-Wl,--defsym=LD_FLASH_OFFSET=" + LD_FLASH_OFFSET
if "-Wl,--defsym=LD_MAX_DATA_SIZE" in flag:
env["LINKFLAGS"][i] = "-Wl,--defsym=LD_MAX_DATA_SIZE=" + str(maximum_ram_size - 40)
if "-Wl,--defsym=LD_MAX_SIZE" in flag:
env["LINKFLAGS"][i] = "-Wl,--defsym=LD_MAX_SIZE=" + str(maximum_flash_size)

#
# For build.encrypt rename and encode the firmware file.
Expand Down
File renamed without changes.
14 changes: 14 additions & 0 deletions buildroot/tests/STM32F103VE_ZM3E4V2_USB_maple
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
#
# Build tests for STM32F103VE_ZM3E4V2_USB
#

# exit on first failure
set -e

restore_configs
opt_set MOTHERBOARD BOARD_ZONESTAR_ZM3E4V2 SERIAL_PORT 1
exec_test $1 $2 "Zonestar ZM3E4 V2.0" "$3"

# cleanup
restore_configs
File renamed without changes.
File renamed without changes.
File renamed without changes.
26 changes: 13 additions & 13 deletions ini/stm32f1-maple.ini
Original file line number Diff line number Diff line change
Expand Up @@ -360,11 +360,11 @@ build_flags = ${common_stm32f1.build_flags}
#
# ZONESTAR ZM3E2 V1.0 / ZM3E4 V1.0 / ZM3E4 V2.0
#
# STM32F103RC_ZM3E2_USB ........... RCT6 with 256K
# STM32F103VC_ZM3E4_USB ........... VCT6 with 256K
# STM32F103VE_ZM3E4V2_USB ......... VET6 with 512K
# STM32F103RC_ZM3E2_USB_maple ........... RCT6 with 256K
# STM32F103VC_ZM3E4_USB_maple ........... VCT6 with 256K
# STM32F103VE_ZM3E4V2_USB_maple ......... VET6 with 512K
#
[ZONESTAR_ZM3E]
[ZONESTAR_ZM3E_maple]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
platform_packages = tool-stm32duino
Expand All @@ -380,18 +380,18 @@ build_flags = ${common_stm32f1.build_flags}
lib_deps = USBComposite for STM32F1@0.91
lib_ignore = Adafruit NeoPixel, SPI, SailfishLCD, SailfishRGB_LED, SlowSoftI2CMaster, TMCStepper

[env:STM32F103RC_ZM3E2_USB]
platform = ${ZONESTAR_ZM3E.platform}
extends = ZONESTAR_ZM3E
[env:STM32F103RC_ZM3E2_USB_maple]
platform = ${ZONESTAR_ZM3E_maple.platform}
extends = ZONESTAR_ZM3E_maple
board = genericSTM32F103RC

[env:STM32F103VC_ZM3E4_USB]
platform = ${ZONESTAR_ZM3E.platform}
extends = ZONESTAR_ZM3E
[env:STM32F103VC_ZM3E4_USB_maple]
platform = ${ZONESTAR_ZM3E_maple.platform}
extends = ZONESTAR_ZM3E_maple
board = genericSTM32F103VC

[env:STM32F103VE_ZM3E4V2_USB]
platform = ${ZONESTAR_ZM3E.platform}
extends = ZONESTAR_ZM3E
[env:STM32F103VE_ZM3E4V2_USB_maple]
platform = ${ZONESTAR_ZM3E_maple.platform}
extends = ZONESTAR_ZM3E_maple
board = genericSTM32F103VE
board_upload.maximum_size = 499712

0 comments on commit b15fc4a

Please sign in to comment.