feat: support merged.bin, boot_app0, upload mode toggle + flash guide

- server.js: add boot_app0 field at 0xe000, raise file limit 8→32 MB
- index.html: add 병합/분리 mode toggle, boot_app0 drop zone, numbered split zones
- app.js: dynamic mode logic, remove hardcoded flashAddress 0x10000,
  server now auto-selects 0x0 (merged) or 0x10000 (split)
- flash-guide.html: step-by-step Korean flash guide with file table,
  method A/B walkthrough, flash_args explanation, troubleshooting

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-05-19 05:26:53 +09:00
parent cb9df54abb
commit 3a662affb6
4 changed files with 842 additions and 47 deletions

View File

@@ -52,7 +52,7 @@ const upload = multer({
cb(new Error('.bin 파일만 업로드 가능합니다'));
}
},
limits: { fileSize: 8 * 1024 * 1024 }, // 8 MB
limits: { fileSize: 32 * 1024 * 1024 }, // 32 MB
});
// ── 라우트 ──────────────────────────────────────────────────────────────────
@@ -68,13 +68,14 @@ app.get('/api/firmware', (_req, res) => {
});
// 펌웨어 업로드
// 지원 필드: firmware(필수), bootloader(선택), partitions(선택)
// 지원 필드: firmware(필수), bootloader(선택), partitions(선택), boot_app0(선택)
app.post(
'/api/firmware/upload',
upload.fields([
{ name: 'firmware', maxCount: 1 },
{ name: 'bootloader', maxCount: 1 },
{ name: 'partitions', maxCount: 1 },
{ name: 'firmware', maxCount: 1 },
{ name: 'bootloader', maxCount: 1 },
{ name: 'partitions', maxCount: 1 },
{ name: 'boot_app0', maxCount: 1 },
]),
(req, res) => {
try {
@@ -105,7 +106,15 @@ app.post(
});
}
// 부트로더가 따로 없으면 0x0, 있으면 0x10000
if (files.boot_app0) {
parts.push({
file: files.boot_app0[0].filename,
offset: '0xe000',
label: 'Boot App0',
});
}
// 부트로더가 따로 없으면(병합 바이너리) 0x0, 있으면 0x10000
const appOffset = flashAddress
|| (files.bootloader ? '0x10000' : '0x0000');