Okay @Gordon I went through the process and everything goes fine until I connect to the board in the webIDE. I get the following message in the console:
>echo(0);
Uncaught Error: Function "log" not found!
at line 1 col 9
console.log("<<"+"<<<"+JSON.stringify(process.env)+">>>"+">>...
^
I swear I didn't delete the log function :)
Running something simple like 1+2 returns the correct answer.
I put a simple text file on the SD card (text.txt) and then tried to read it out (it simply contains the word 'hello') like this:
>var f = require("fs").readFile("test.txt");
ERROR: Unable to mount SD card : NOT_READY
I then just ran the command make and out popped espruino_1v70_stm32f4discovery.bin (I was expecting a file with a 1v69 version).
I must say I can't figure out how to use stm32loader.py. With both USB cables plugged into the Discovery board, without jumpers on the GND-PB2 and BOOT0-VDD pin pairs the board is mounted on /dev/ttyACM2.
Reading data from espruino_1v70_stm32f4discovery.bin
Can't init. Ensure BOOT0=1, BOOT1=0, and reset device
Traceback (most recent call last):
File "scripts/stm32loader.py", line 554, in <module>
bootversion = cmd.cmdGet()
File "scripts/stm32loader.py", line 140, in cmdGet
if self.cmdGeneric(0x00):
File "scripts/stm32loader.py", line 137, in cmdGeneric
return self._wait_for_ack(hex(cmd))
File "scripts/stm32loader.py", line 101, in _wait_for_ack
raise CmdException("Unrecognised response 0x%x to %s" % (ask, info))
__main__.CmdException: Unrecognised response 0xff to 0x0
So instead I use the stlink application as follows:
Disconnect power and put jumpers across the GND-PB2 and BOOT0-VDD pin pairs.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Okay @Gordon I went through the process and everything goes fine until I connect to the board in the webIDE. I get the following message in the console:
I swear I didn't delete the log function :)
Running something simple like
1+2
returns the correct answer.I put a simple text file on the SD card (
text.txt
) and then tried to read it out (it simply contains the word 'hello') like this:Any tips?
This is exactly what I did to get to this point:
The relevant sections of my
Makefile
look like this:and the
boards/STM32F4DISCOVERY.py
:I then just ran the command
make
and out poppedespruino_1v70_stm32f4discovery.bin
(I was expecting a file with a1v69
version).I must say I can't figure out how to use
stm32loader.py
. With both USB cables plugged into the Discovery board, without jumpers on theGND-PB2
andBOOT0-VDD
pin pairs the board is mounted on/dev/ttyACM2
.Running the following command:
I end up with the following error:
So instead I use the
stlink
application as follows:GND-PB2
andBOOT0-VDD
pin pairs.Run the following command:
Everything flashes fine and I can remove the jumpers and restart the board.