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

Dictionary entries in the EEPROM #178

Closed
TG9541 opened this issue Mar 25, 2018 · 1 comment
Closed

Dictionary entries in the EEPROM #178

TG9541 opened this issue Mar 25, 2018 · 1 comment
Assignees

Comments

@TG9541
Copy link
Owner

TG9541 commented Mar 25, 2018

Using the EEPROM to store dictionary entries can free up more than 500 bytes of Flash memory for application software on a Low Density device - a non-negligible amount.

Since no code can be executed from the EEPROM, only ALIAS words are allowed

@TG9541 TG9541 closed this as completed in 189e8aa Mar 25, 2018
TG9541 added a commit that referenced this issue Mar 25, 2018
fixes #178 - Dictionary entries in the EEPROM
@TG9541 TG9541 self-assigned this Mar 25, 2018
TG9541 added a commit that referenced this issue Apr 8, 2018
@TG9541
Copy link
Owner Author

TG9541 commented Oct 29, 2018

Please be aware that the STM8 core will always go through a reset when executing binary code from EEPROM. Since it is still possible to have dictionary entries in the EEPROM the unique STM8 eForth ALIAS feature allows moving Forth headers from the core to the EEPROM!

The library word EEALIAS does the following:

  • find the root of the dictionary in Flash memory
  • unlink an existing the EEPROM
  • create and link a dictionary in the EEPROM (i.e. EEPROM MODE )
  • abort if a normal compilation (non-ALIAS words) is attempted

After defining ALIAS words, e.g. from a build's target directory, return to RAM MODE with EECLOSE when done.

When the dictionary entries in the EEPROM are no longer needed, EERESET can be used to unlink the dictionary in the Flash ROM.

\ EEPROM MODE Example:
\ define ALIAS words in the EEPROM, 
#include EEALIAS
\ load ALIAS words
#require SPACES
#require DIGIT
#require DNEGATE
\ done: return to normal, and WIPE RAM
EECLOSE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant