installing espruino on stm32F100 based diy project #6828
Replies: 1 comment
-
Posted at 2018-07-02 by @gfwilliams Is there a spare pin there that you could set up as LED1 in the board python file? When starting Espruino should flash LED1 once during the init process. Usually Espruino disables JTAG/SWD on those pins so they're available for other stuff (https://github.com/espruino/Espruino/blob/master/targets/stm32/jshardware.c#L1228) so the fact that is happening is actually good news - it's running at least some code. What could be happening is that the oscillator is set up wrong and the CPU is actually running at the wrong frequency. Do you have an oscilloscope or something you can put on the TX pin? Espruino should transmit some text at boot and by looking at it you could see if the bit rate is actually 9600 or if it's something else. Posted at 2018-07-02 by @gfwilliams Just to add, I tried out the VLDiscovery build just now and while it works on the board, it was impossible to do much - it crashed almost immediately because I believe there wasn't much RAM left for stack. I've just tweaked the variable count - from 500 down to 400, and it works much more reliably (although I don't think that was actually your problem). Posted at 2018-07-02 by George Thanks for a quick response and your awesome project, @gfwilliams. I set the LED1 to A13. My devices block looks like this
Indeed, the LED makes one really short flash when the board is powered on. Looks like Espruino is there, but minicom connection to UART is still silent. As far as I know, if the bit rate is mismatched you should get at least some weird ASCII symbols instead of data. But I get nothing. I reduced the number of variables to 400 just to be sure. Also, I added this two lines
Not sure if they really change something for the build. I copied them from the original Espruino board config. 400 variables are still more than enough for me. I need to blink some LEDs and control some transistors. By the way, can my chip store some code at all? I really like the idea of programming a chip with js, I can't wait to make it work) Posted at 2018-07-02 by Wilberforce Have you got tx and rx the wrong way around? Posted at 2018-07-03 by @gfwilliams If you don't have a scope, maybe you could stick a LED between A9 and 3.3v and see it it at least flashes on boot? Espruino should transmit its logo at startup so you should see it flashing if that's the case. If that works then you can narrow it down to something with the USB TTL dongle... You have connected GND as well as RX and TX? Posted at 2018-07-03 by George I did what you said. The LED connected between A9 and 3.3V is not flashing. I made a second board from fresh components just in case I broke something but had the same effect. Looks like the chip is not sending anything to this UART. Maybe there is a pin configuration issue? Maybe because the default package for STM32VLDISCOVERY is Posted at 2018-07-03 by @gfwilliams You could try adding If the package is such that not all pins on a port are brought out it can break the pin naming, so that could be an issue. You could also try explicitly setting the Posted at 2018-07-03 by George I added this to the info block
And this to the
With no effect, unfortunately. By the way, I checked the CSV table And they look correct. I found something interesting. This
Posted at 2018-07-03 by @gfwilliams No, that should all be fine. You can check in Actually I just had a thought - are you sure it's the same chip? Your circuit diagram says STM32F100C8T6B which only has 64kB flash. That wouldn't be enough for Espruino - the VL board has 128kB which is the absolute minimum Posted at 2018-07-03 by George Unfortunately, I made the diagram and printed the PCB before I heard about your project. I replaced that chip with STM32F100CBT68 with 128kb of flash. This is the biggest chip in the LQFP48 package and I can't go bigger. But 128 should be enough. By the way, is it possible to store some code on 128kb chip? Posted at 2018-07-03 by George Here is my is this correct if hardware pin numbers are Upd: I think this information from
Posted at 2018-07-04 by @gfwilliams
Yes, absolutely. There's not much space available, but it's enough - besides, there's not too much RAM either :) I think you'll need the Either way that should affect the UART, since it's on port A which is earlier in the pin array. Honestly I'm not too sure what to suggest at this point - maybe check Posted at 2018-07-04 by George Hi, Gordon. I updated my previous answer with a link to a full I tried adding
but it didn't change anything in Here is my Posted at 2018-07-04 by @gfwilliams
Posted at 2018-07-04 by George I searched the repo with "LQFP48" to find similar boards and some clues. I found that
I pasted it to
Posted at 2018-07-04 by @gfwilliams That's not the issue - that function is when pin names don't match that actual chip. Your files look ok, so honestly I'd start trying to turn pins on and off to see what is going on. Are you sure you installed the right compiler, using the provision script? Posted at 2018-07-04 by George Where should I put the Posted at 2018-07-04 by @gfwilliams maybe try some different places, but as a start:
Ideally they should both end up getting called and flashing the LED. You could also try this at the end of
In fact maybe just try doing that last one on its own - if the LED flashes then Espruino is working, it's just the serial that's not set up right. Posted at 2018-10-25 by George Finally! It works! I just tried to build it with docker (i had to tinker a docker file a little bit) and it worked. I think the problem was with my build environment. Thank you for help. I can make a pull request with configs for vanilla STM32F100 LQFP48 package if you wish. Now I am going to become your patreon supporter. Posted at 2018-10-26 by @gfwilliams That's great - thanks! I'm afraid I wouldn't take any new However, what changes did you have to make to Docker, and how did you get it working? Ideally I'd be able to make it so it 'just worked'. Posted at 2018-10-26 by George I created a pull request with my dockerfile here espruino/Espruino#1543 Posted at 2018-10-27 by @gfwilliams Thanks! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2018-07-01 by George
Hi, I am trying to install Espruino on stm32f100 chip and use it in my DIY nixie clock project. I found that STM32VLDISCOVERY board is based on the exact same chip. I used it's firmware and flashed it on my chip using JTAG programmer (made from a raspberry pi + openOCD). The programmer says that the firmware is flashed successfully, but when I connect to the chip's uart with
minicom -o -b 9600 -D /dev/ttyAMA0
i get nothing. There is no Espruino console.Here is how my wiring looks like:

Here is what I had tried:
STM32VLDISCOVERY
and changed the package to LQFP48 to match my chipI also found some weird behavior.
In
boards/STM32VLDISCOVERY.py
in devices section, there are JTAG pins definedBut after flashing the programmer can't connect to the chip again without "connect under reset" procedure, which means that this pins have been overwritten.
Any clues will be appreciated
Beta Was this translation helpful? Give feedback.
All reactions