-
Notifications
You must be signed in to change notification settings - Fork 43
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
Problem with flashing modules #38
Comments
Yeah, in the recent version this changed quite much. The flash.py flashes everything by default, so GPIO is there. In order to use it you have to load it by either typing
in the REPL, or by adding GPIO load to the beginning of your program (or right before you wan't to use GPIO related words). This is similar than an import in other languages. If you load something multiple times, it will eventually eat up the dictionary space so make sure you load it once. So normally you don't need to worry about what modules you want to have up front. You just flash everything and later you can load anything into memory if needed. I still need to update the doc about this. |
So I would have to "FLASH" load for example to use that module? And the
same would be true for any of the other modules listed in AVAILABLE_MODULES
in flash.py?
So all modules are loaded into flash but only are moved to RAM when they
are loaded?
…On Wed, May 9, 2018 at 1:44 AM, Attila Magyar ***@***.***> wrote:
Yeah, in the recent version this changed quite much. The flash.py flashes
everything by default, so GPIO is there. In order to use it you have to
load it by either typing
(stack) GPIO load
in the REPL, or by adding *GPIO load* to the beginning of your program
(or right before you wan't to use GPIO related words). This is similar than
an import in other languages. If you load something multiple times, it will
eventually eat up the dictionary space so make sure you load it once.
So normally you don't need to worry about what modules you want to have up
front. You just flash everything and later you can load anything into
memory if needed.
I still need to update the doc about this.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#38 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AfyujwtIvD3VM0nR6jvNYwIcBiZBeVZ-ks5twp5pgaJpZM4T3lKu>
.
--
Craig Lindley / Heather Hubbard
495's Recordings: craigandheather.net/495spage.html
New Recordings: craigandheather.net/cnmpage.html
Latest rock CD: craigandheather.net/oneinarow.html
Latest non-rock CD: craigandheather.net/craigdoesfingerstyle.html
Personal Website: craigandheather.net
Phone: (719) 495-1873
Cell: (719) 502-7925
If you’re one in a million, there are now seven thousand people exactly
like you.
|
yes, that is correct. Here are the names of the available modules: https://github.com/zeroflag/punyforth/blob/master/arch/esp8266/bin/flash.py#L236 CORE is already loaded. |
I updated the doc with some new info https://github.com/zeroflag/punyforth/wiki/Developing-and-deploying-Punyforth-applications |
I followed the documentation in the readme file and successfully flashed a esp8266 using the following commands on my mac:
python flash.py /dev/tty.SLAB_USBtoUART
My understanding is that without specifying which modules to program, all modules would be programmed including the GPIO module. Unfortunately when I type help to see all defined words, words like GPIO_HIGH or GPIO_IN, etc. are not found. Further more when I try to examine the value of GPIO_HIGH it is undefined.
Then I attempted to specify the GPIO module directly using the following command line it still doesn't work.
python flash.py /dev/tty.SLAB_USBtoUART --modules core gpio flash
What am I doing wrong?
I should also say that the docs still shows the use of modules.py file to control which forth modules to be included in uber.forth. It now seems uber.forth is no longer used and the modules.py functionality is now included in the flash.py file. Please update the docs to match the code when you get a chance.
The text was updated successfully, but these errors were encountered: