Skip to content

Improvement: pack Artisan major image with screen type 3 and Artisan prefix - #2

Merged
scotthsl merged 1 commit into
Snapmaker:mainfrom
macdylan:improvement/artisan-major-image-pack
Oct 3, 2026
Merged

scotthsl merged 1 commit into
Snapmaker:mainfrom
macdylan:improvement/artisan-major-image-pack

Conversation

@macdylan

@macdylan macdylan commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Summary

pack_for_hmi.py still carried two SM2 toolchain defaults that are wrong for this A400-only repo:

  • TYPE_SCREEN_MODULE = 2 → 3 — the Artisan screen app UpdateFileParser maps major-image segment ids as MC=0 / EM=1 / BT=2 / SC=3, so writing 2 for the screen segment makes it collide with the BT segment. Since this repo is A400-only, the correct id is baked into the constant instead of being a runtime knob (a forgotten flag would silently produce an image whose screen segment is parsed as BT).
  • Major image version prefix SM3_ → Artisan_ — output is now e.g. Artisan_V2.8.2_20261002.bin, matching the naming of released Artisan artifacts. A new -p/--prefix option overrides the prefix if another name is needed.

Behavior change

The pack target in platformio-targets.py calls this script without options, so its major image artifact is renamed from SM3_V{version}_{date}.bin to Artisan_V{version}_{date}.bin. Controller/module segment ids (0/1) are unchanged.

Verification

Packed images with dummy payloads and parsed the headers (Length / 32-byte version / flag / count / 9-byte segment heads):

Invocation Output Segment
-s screen.bin -v V2.8.2 Artisan_V2.8.2_20261002.bin (type=3, offset=48, size=payload)
-c A400_MC_V2.3.4.bin -v V2.3.4 Artisan_V2.3.4_20261002.bin (type=0, offset=48, size=payload)
-c A400_MC_V2.3.4.bin -v V2.3.4 -p A400 A400_V2.3.4_20261002.bin (type=0, offset=48, size=payload)

…prefix

- TYPE_SCREEN_MODULE 2 -> 3: in the Artisan screen app UpdateFileParser the
  major image segment ids are MC=0/EM=1/BT=2/SC=3, so 2 collides with the BT
  segment. This repo is A400-only, so bake the correct id in instead of
  keeping the SM2 value inherited from the SM2 toolchain.
- Major image version prefix "SM3" -> "Artisan" (e.g. Artisan_V2.8.2_20261002.bin),
  matching released artifact naming. New -p/--prefix option overrides it.
@scotthsl
scotthsl merged commit f5af621 into Snapmaker:main Oct 3, 2026
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