Skip to content
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

added 16/24 bit mixed address space #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thomas-haller
Copy link

In a project of our company we had the following problems:
-small mode was not usable as the (used) flash area was larger than 32kB
-medium mode made to many problems in decompilation because of the zero extension of the stack pointer.
Our solution was to create a mixed mode. Similar to an harvard architecture we specified a 16 bit address bus "RAM" for all data accesses and a 24 bit address bus "ROM" for all code fetching.

Pro:

  • Indirect memory accesses don't have a zero extension in the address calculation, so the decompiled c code looks better.
  • Code can be larger than 32kB.
    Con:
  • Constants in flash memory must be within the first 32kB of the flash.
  • The stack pointer + 0 problem still exist (bug in Ghidra, not in the CPU definition)

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.

1 participant