Repository navigation
Conversation
Vendor USBDM's HCS12-XMMC-XFTMRK-flash-program.s19 and route the paged S12X device entries to it. The routine uses the same large-code ABI as GMMC, so the driver is unchanged. Five parts gain geometry: mc9s12xep100-family, xs64, xs128, xs256 and xf512. Every existing table entry is byte-identical. - gen_devices: accept the XFTMRK routine. XMMC entries give the reset page (0xFE) as pageReset and size the window with `pages`, so the lowest page is derived from pageEnd and the page count (1024K -> C0). MMCV4 keeps using pageReset. - prepareFlash: every HCS12 flash operation now starts with a special-mode hardware reset and a reconnect, as the reference programmer does. A target running its own code acks memory access but not the PC write that starts the routine (BDM_RC_ACK_TIMEOUT), so flashing a running board failed. - XFTMRK expects FCLKDIV to be loaded already and otherwise reports an invalid divider. Port the reference Tcl initTarget/initFlash: COP off, FCLKDIV from 2x the special-mode bus clock, FPROT/EPROT unprotected. - --sim refuses XFTMRK parts; there is no S12XE flash model and the FTS one would report a meaningless pass. Tested on an MC9S12XET256 (SDID 0xC081) with a JS16 USBDM on macOS: unsecure (mass erase, then FSEC=0xFE), then program with verify of a 61 KB image across both fixed windows and four PPAGE pages. A raw-BDM readback of every window, setting PPAGE directly, matched all 61,825 bytes. After a normal reset the board runs the image: halted in the application's main loop, PPAGE=0xFB.
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.
Vendor USBDM's HCS12-XMMC-XFTMRK-flash-program.s19 and route the paged S12X device entries to it. The routine uses the same large-code ABI as GMMC, so the driver is unchanged. Five parts gain geometry: mc9s12xep100-family, xs64, xs128, xs256 and xf512. Every existing table entry is byte-identical.
pages, so the lowest page is derived from pageEnd and the page count (1024K -> C0). MMCV4 keeps using pageReset.Tested on an MC9S12XET256 (SDID 0xC081) with a JS16 USBDM on macOS: unsecure (mass erase, then FSEC=0xFE), then program with verify of a 61 KB image across both fixed windows and four PPAGE pages. A raw-BDM readback of every window, setting PPAGE directly, matched all 61,825 bytes. After a normal reset the board runs the image: halted in the application's main loop, PPAGE=0xFB.