[HIC]Add support for the NXP LPC845 Breakout board - #1114
Merged
Conversation
The LPC11U35 has no DAPLink bootloader, so the only way to program the HIC is the on-chip ROM ISP MSC drive (CRP DISABLD). That drive maps a fixed-size firmware.bin 1:1 onto the whole 0xF000 app region, and deleting firmware.bin only clears the directory entry -- the flash sectors keep the previous contents. A short image therefore left stale bytes from the old firmware in the tail, producing a corrupt image that would not boot, with no USB enumeration and no indication of why. Add a .fill section padding .text out to the end of the app region, the same way the kinetis and lpc4322 linker scripts already do. The bin and hex are now both a full 0xF000 and can be programmed directly. This also fixes the interface CRC reported in DETAILS.TXT. info.c computes it over DAPLINK_ROM_IF_SIZE - 4 unconditionally, so with a short image the value depended on whatever stale bytes followed the image and never matched the CRC recorded at build time. The build-time CRC now lands at 0xEFFC, exactly where info_crc_compute() expects it. Verified by building all 30 lpc11u35_*_if projects with GCC 10.3-2021.10: all link and produce a 0xF000 image, none overflow m_text. Signed-off-by: Harry Qian <huan.qian@nxp.com>
HuanQian571
force-pushed
the
feature/lpc845
branch
from
August 17, 2026 06:49
dd50935 to
a83d5a9
Compare
mathias-arm
requested changes
Aug 18, 2026
HuanQian571
force-pushed
the
feature/lpc845
branch
from
August 19, 2026 02:37
a83d5a9 to
e4d58ae
Compare
On this board the HIC is an LPC11U35 and the target is an LPC845, so the firmware is built from the existing lpc11u35 HIC anchor and only the board and target family layers are new. The LPC84x family shares the LPC82x IAP ROM interface (entry 0x1FFF1FF1) and IAP command model, so the LPC824 flash algorithm applies unchanged. No custom reset or unlock behavior is needed, so the generic kStub_HWReset_FamilyID stub family is used rather than a new target_reset.c. Signed-off-by: Harry Qian <huan.qian@nxp.com>
HuanQian571
force-pushed
the
feature/lpc845
branch
from
August 20, 2026 02:58
e4d58ae to
deaa493
Compare
mathias-arm
approved these changes
Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds DAPLink interface firmware support for the NXP LPC845 Breakout board (HIC: LPC11U35, target: LPC845), plus two fixes found while bringing it up.
Commits
1.
lpc11u35: Fill the interface image out to the end of the app region.The LPC11U35 has no DAPLink bootloader, so the only way to program the HIC is the on-chip ROM ISP MSC drive (
CRP DISABLD). That drive maps a fixed-sizefirmware.bin1:1 onto the whole0xF000app region, and deletingfirmware.binonly clears the directory entry — the flash sectors keep their previous contents. A short image therefore left stale bytes from the old firmware in the tail, producing an image that would not boot, with no USB enumeration and no indication why.Adds a
.fillsection padding.textout to the end of the app region, the same waykinetis.ldandlpc4322.ldalready do.This also fixes the interface CRC reported in
DETAILS.TXT.info_crc_compute()checksumsDAPLINK_ROM_IF_SIZE - 4unconditionally, so with a short image the value depended on whatever stale bytes followed the image and never matched the CRC recorded at build time. The build-time CRC now lands at0xEFFC, exactly whereinfo_crc_compute()expects it.Affects all 30
lpc11u35_*_ifprojects, so it is kept as a separate commit.2.
Add support for the NXP LPC845 Breakout board.Board and target-family layers only; the firmware reuses the existing
lpc11u35HIC anchor. No custom reset or unlock behaviour is needed, so the generickStub_HWReset_FamilyIDstub family is used rather than a newtarget_reset.c.3.
lpc845: Regenerate the flash algorithm from the official LPC84x FLM.The flash algorithm was initially copied from the LPC824 family on the assumption that LPC84x shares the LPC82x IAP ROM interface. It does not. Keil's own algorithm source, shipped in
Keil.LPC800_DFPasFlash/LPC8xx_IAP/FlashPrg.c, distinguishes the two:Byte-comparing
LPC8xx_32.FLMagainstLPC84x_64.FLMshows exactly three functional differences, all of which the copied blob got wrong:0x1FFF1FF10x0F001FF10x0F000000; every IAP call branched to a non-existent addressEND_SECTOR3163MAINCLKSEL/MAINCLKUEN/SYSAHBCLKDIV+0x70/74/78+0x50/54/58Initwrote to the wrong registersThe
END_SECTORbug is on the default drag-n-drop path:flash_managercallserase_chip()wheneverkEnablePageEraseis not set, and this board does not set it.Regenerated from the authoritative algorithm rather than patching bytes:
The flash geometry the previous blob declared was already correct and is unchanged (one 1 kB sector descriptor at 0, 64 kB region), matching the FLM.
target.cneeds no change; its flash and RAM regions also match the pack'sIROM1/IRAM1forLPC845M301JBD48.Testing
lpc11u35_*_ifprojects build with GCC 10.3-2021.10; each produces a0xF000image and none overflowm_text.lpc11u35_lpc845breakout_ifto an LPC845 Breakout board. It enumerates as a full DAPLink MSD drive, andDETAILS.TXTreports an interface CRC matching the build's_crc.txt.0x8000— sectors that the previousEND_SECTORof 31 would have left unerased.lpc845m301jbd48: halt/resume, core register reads, CPUID (0x410CC601, Cortex-M0+), 4 kB RAM write/read round trip, andreset_and_halt.test/run_test.pyendpoint tests were not run: they require adaplink-validationimage built for the LPC845, which does not exist, and--testdlself-skips because this board has no bootloader.Notes for reviewers
test/info.pyentry is added for board ID0xD002(LPC845BREAKOUT).records/board/lpc845breakout.yamlandsource/board/lpc845breakout.cfollowdocs/PORT_BOARD.md; no common code is touched, so the no-#ifdefrule is preserved.