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

run bitlash code stored in flash #44

Closed
pwl42 opened this issue Mar 20, 2015 · 5 comments
Closed

run bitlash code stored in flash #44

pwl42 opened this issue Mar 20, 2015 · 5 comments

Comments

@pwl42
Copy link

pwl42 commented Mar 20, 2015

hi Bill,
have you ever built a version that would interpret bitlash code that is stored in the unused part of flash (on a 32K mcu)? it seems to me that would be a good place to put a larger program.

@billroy
Copy link
Owner

billroy commented Mar 21, 2015

Hello and thanks for your question.

You can define functions in flash by adding them to the “builtin_table” data structure in the file src/bitlash-builtins.c; see the doc there for the use of the BUILT_IN macro. Functions built-in this way can be run just like eeprom functions.

I hope that helps, and I’m happy to take followup questions.

-br

On Mar 20, 2015, at 2:38 PM, pwl42 notifications@github.com wrote:

hi Bill,
have you ever built a version that would interpret bitlash code that is stored in the unused part of flash (on a 32K mcu)? it seems to me that would be a good place to put a larger program.


Reply to this email directly or view it on GitHub #44.

@pwl42
Copy link
Author

pwl42 commented Mar 21, 2015

I guess I am just being too picky. I would prefer to load unused flash memory blocks with bitlash code and have it executed the same way as code in eeprom. Those blocks could be replaced without recompiling. Of course, this would be useful only on the larger devices.

On the internet nobody can hear you being subtle. --Linus Torvalds


On Fri, 3/20/15, Bill Roy notifications@github.com wrote:

Subject: Re: [bitlash] run bitlash code stored in flash (#44)
To: "billroy/bitlash" bitlash@noreply.github.com
Cc: "pwl42" pwl42@yahoo.com
Date: Friday, March 20, 2015, 8:23 PM

Hello and thanks for your question.

You can define functions in flash by adding them to the
“builtin_table” data structure in the file
src/bitlash-builtins.c; see the doc there for the use of the
BUILT_IN macro. Functions built-in this way can be run just
like eeprom functions.

I hope that helps, and I’m happy to take followup
questions.

-br

On Mar 20, 2015, at 2:38 PM, pwl42
notifications@github.com wrote:

hi Bill,

have you ever built a version that would interpret
bitlash code that is stored in the unused part of flash (on
a 32K mcu)? it seems to me that would be a good place to put
a larger program.

Reply to this email directly or view it on GitHub
#44.


Reply to this email directly or view
it on GitHub.

@billroy
Copy link
Owner

billroy commented Mar 21, 2015

Thanks for clarifying. If I understand correctly, you would like to write the flash dynamically at runtime, like the eeprom.

Last time I checked, it was considered tricky to write to flash at runtime, and there were no libraries available to do it.

If, however, someone has developed a library to write to flash at runtime, this would not be a difficult feature to implement.

-br

On Mar 21, 2015, at 2:16 AM, pwl42 notifications@github.com wrote:

I guess I am just being too picky. I would prefer to load unused flash memory blocks with bitlash code and have it executed the same way as code in eeprom. Those blocks could be replaced without recompiling. Of course, this would be useful only on the larger devices.

On the internet nobody can hear you being subtle. --Linus Torvalds


On Fri, 3/20/15, Bill Roy notifications@github.com wrote:

Subject: Re: [bitlash] run bitlash code stored in flash (#44)
To: "billroy/bitlash" bitlash@noreply.github.com
Cc: "pwl42" pwl42@yahoo.com
Date: Friday, March 20, 2015, 8:23 PM

Hello and thanks for your question.

You can define functions in flash by adding them to the
“builtin_table” data structure in the file
src/bitlash-builtins.c; see the doc there for the use of the
BUILT_IN macro. Functions built-in this way can be run just
like eeprom functions.

I hope that helps, and I’m happy to take followup
questions.

-br

On Mar 20, 2015, at 2:38 PM, pwl42
notifications@github.com wrote:

hi Bill,

have you ever built a version that would interpret
bitlash code that is stored in the unused part of flash (on
a 32K mcu)? it seems to me that would be a good place to put
a larger program.

Reply to this email directly or view it on GitHub
#44.


Reply to this email directly or view
it on GitHub.


Reply to this email directly or view it on GitHub #44 (comment).

@pwl42
Copy link
Author

pwl42 commented Mar 21, 2015

I was thinking that I would write to those unused blocks when I loaded bitlash and If I needed to change them later I would use avrdude. Is the flash readable only as 16 bit words and, if so, is that a problem?

On the internet nobody can hear you being subtle. --Linus Torvalds


On Sat, 3/21/15, Bill Roy notifications@github.com wrote:

Subject: Re: [bitlash] run bitlash code stored in flash (#44)
To: "billroy/bitlash" bitlash@noreply.github.com
Cc: "pwl42" pwl42@yahoo.com
Date: Saturday, March 21, 2015, 7:17 AM

Thanks for clarifying. If I
understand correctly, you would like to write the flash
dynamically at runtime, like the eeprom.

Last time I checked, it was considered tricky to write to
flash at runtime, and there were no libraries available to
do it.

If, however, someone has developed a library to write to
flash at runtime, this would not be a difficult feature to
implement.

-br

On Mar 21, 2015, at 2:16 AM, pwl42
notifications@github.com wrote:

I guess I am just being too picky. I would prefer to
load unused flash memory blocks with bitlash code and have
it executed the same way as code in eeprom. Those blocks
could be replaced without recompiling. Of course, this would
be useful only on the larger devices.

On the internet nobody can hear you being subtle.
--Linus Torvalds


On Fri, 3/20/15, Bill Roy
notifications@github.com wrote:

Subject: Re: [bitlash] run bitlash code stored in flash
(#44)

To: "billroy/bitlash"
bitlash@noreply.github.com

Cc: "pwl42" pwl42@yahoo.com

Date: Friday, March 20, 2015, 8:23 PM

Hello and thanks for your question.

You can define functions in flash by adding them to
the

“builtin_table” data structure in the file

src/bitlash-builtins.c; see the doc there for the use
of the

BUILT_IN macro. Functions built-in this way can be run
just

like eeprom functions.

I hope that helps, and I’m happy to take followup

questions.

-br

On Mar 20, 2015, at 2:38 PM, pwl42

notifications@github.com wrote:

hi Bill,

have you ever built a version that would
interpret

bitlash code that is stored in the unused part of flash
(on

a 32K mcu)? it seems to me that would be a good place
to put

a larger program.

Reply to this email directly or view it on GitHub

#44.

Reply to this email directly or view

it on GitHub.

Reply to this email directly or view it on GitHub
#44 (comment).


Reply to this email directly or view
it on GitHub.

@billroy
Copy link
Owner

billroy commented Mar 21, 2015

IIRC the flash is only writable in pages of some size considerably greater than one byte. And I believe there is some complication about having to be in bootloader mode to write to it, though I may be recalling that incorrectly.

-br

On Mar 21, 2015, at 7:22 AM, pwl42 notifications@github.com wrote:

I was thinking that I would write to those unused blocks when I loaded bitlash and If I needed to change them later I would use avrdude. Is the flash readable only as 16 bit words and, if so, is that a problem?

On the internet nobody can hear you being subtle. --Linus Torvalds


On Sat, 3/21/15, Bill Roy notifications@github.com wrote:

Subject: Re: [bitlash] run bitlash code stored in flash (#44)
To: "billroy/bitlash" bitlash@noreply.github.com
Cc: "pwl42" pwl42@yahoo.com
Date: Saturday, March 21, 2015, 7:17 AM

Thanks for clarifying. If I
understand correctly, you would like to write the flash
dynamically at runtime, like the eeprom.

Last time I checked, it was considered tricky to write to
flash at runtime, and there were no libraries available to
do it.

If, however, someone has developed a library to write to
flash at runtime, this would not be a difficult feature to
implement.

-br

On Mar 21, 2015, at 2:16 AM, pwl42
notifications@github.com wrote:

I guess I am just being too picky. I would prefer to
load unused flash memory blocks with bitlash code and have
it executed the same way as code in eeprom. Those blocks
could be replaced without recompiling. Of course, this would
be useful only on the larger devices.

On the internet nobody can hear you being subtle.
--Linus Torvalds


On Fri, 3/20/15, Bill Roy
notifications@github.com wrote:

Subject: Re: [bitlash] run bitlash code stored in flash
(#44)

To: "billroy/bitlash"
bitlash@noreply.github.com

Cc: "pwl42" pwl42@yahoo.com

Date: Friday, March 20, 2015, 8:23 PM

Hello and thanks for your question.

You can define functions in flash by adding them to
the

“builtin_table” data structure in the file

src/bitlash-builtins.c; see the doc there for the use
of the

BUILT_IN macro. Functions built-in this way can be run
just

like eeprom functions.

I hope that helps, and I’m happy to take followup

questions.

-br

On Mar 20, 2015, at 2:38 PM, pwl42

notifications@github.com wrote:

hi Bill,

have you ever built a version that would
interpret

bitlash code that is stored in the unused part of flash
(on

a 32K mcu)? it seems to me that would be a good place
to put

a larger program.

Reply to this email directly or view it on GitHub

#44.

Reply to this email directly or view

it on GitHub.

Reply to this email directly or view it on GitHub
#44 (comment).


Reply to this email directly or view
it on GitHub.


Reply to this email directly or view it on GitHub #44 (comment).

@pwl42 pwl42 closed this as completed Mar 24, 2015
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

No branches or pull requests

2 participants