-
Notifications
You must be signed in to change notification settings - Fork 0
Add standalone Nucleus integration #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
47f8df8
Add initial Nucleus support to Debug80
jhlagado 6ab7eca
Harden Nucleus launch integration
jhlagado da954c5
Fix Nucleus integration lint
jhlagado 5621ac5
Integrate Nucleus D8 source maps
jhlagado 6713fb9
Reject banked Nucleus Debug80 launches
jhlagado File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # Nucleus Source Maps in Debug80 | ||
|
|
||
| For each build, Debug80 requests three related artifacts from the standalone | ||
| Nucleus compiler: canonical NOBJ, launchable Intel HEX, and a native D8 | ||
| source-map sidecar. The | ||
| backend publishes the three files as one generation. A missing or empty file, | ||
| a compiler diagnostic, or a publication error leaves the previous generation | ||
| unchanged. | ||
|
|
||
| The sidecar is written beside the HEX file with the same base name: | ||
|
|
||
| ```text | ||
| build/main.nobj | ||
| build/main.hex | ||
| build/main.d8.json | ||
| ``` | ||
|
|
||
| The normal Debug80 D8 validator and source manager load the map. Source | ||
| breakpoints and PC-to-source lookup therefore use the same path as AZM and | ||
| Glimmer targets; the Nucleus backend does not parse compiler listings or infer | ||
| source from compiler addresses. | ||
|
|
||
| Nucleus records 1-based byte columns in D8. Debug80's initial Nucleus behavior | ||
| binds and steps at line granularity because the current importer does not keep | ||
| columns through every internal lookup. Column-aware stepping is a separate | ||
| change. | ||
|
|
||
| The standalone Node host can also compile banked targets and emit one D8 map | ||
| per physical bank. Those maps use the existing D8 memory-bank metadata and | ||
| Debug80 external address-space identity. Debug80's Nucleus application loader | ||
| currently accepts one flat Intel HEX image, so the launch backend rejects a | ||
| target profile whose `bankCount` is greater than one before invoking the | ||
| compiler. It does not flatten a banked object or invent a bank-selection | ||
| policy. Use the standalone CLI when banked NOBJ and per-bank D8 artifacts are | ||
| required. | ||
|
|
||
| The event protocol used to produce the sidecar is documented in the Nucleus | ||
| repository. It is active only while the host-instrumented Z80 compiler runs. | ||
| Once compilation finishes, ports `$D8..$DF` return to ordinary emulated-device | ||
| handling for target programs. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| { | ||
| "comments": { | ||
| "lineComment": "#" | ||
| }, | ||
| "brackets": [ | ||
| ["(", ")"], | ||
| ["[", "]"] | ||
| ], | ||
| "autoClosingPairs": [ | ||
| { "open": "(", "close": ")" }, | ||
| { "open": "[", "close": "]" }, | ||
| { "open": "\"", "close": "\"", "notIn": ["string", "comment"] }, | ||
| { "open": "'", "close": "'", "notIn": ["string", "comment"] } | ||
| ], | ||
| "surroundingPairs": [ | ||
| ["(", ")"], | ||
| ["[", "]"], | ||
| ["\"", "\""], | ||
| ["'", "'"] | ||
| ], | ||
| "folding": { | ||
| "markers": { | ||
| "start": "^\\s*(?:record|sub|if|elseif|else|while|for|handle)\\b", | ||
| "end": "^\\s*end\\b" | ||
| } | ||
| } | ||
| } | ||
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a user invokes Toggle Line Comment, this configuration inserts
#, which the compiler rejects:packages/nucleus/docs/specification.mddefines//as the sole comment form and identifies hash as invalid syntax. The new TextMate grammar likewise matches#.*$, so valid//comments are not highlighted while invalid text is. Update both the language configuration and grammar to recognize//.Useful? React with 👍 / 👎.