maple bootloaders are loaded by jtag would usbtiny work?
I was wondering how the initial firmware was loaded into a maple?
I see people are looking into in circuit debugging using a jtag in circuit debugger.
maple bootloaders are loaded by jtag would usbtiny work?
(11 posts) (4 voices)-
Posted 5 years ago #
-
The only usbtiny that I know of is a SPI programmer for AVRs, not a JTAG adapter, and would not work with a maple. If the usbtiny happens to have enough I/O lines it might be possible to write new firmware to use it as a JTAG adapter, but because of its software USB implementation it might be slower than a JTAG adapter with a real USB interface.
Posted 5 years ago # -
Firmware can be loaded into STM32F103's using a serial interface to USART1.
There is a bootloader which loads over USART1 manufactured into STM32F10x.So you could use an FTDI chip to create a USB to USART interface; no software to write, it "Just Works" (TM).
Or, you could use a Maple to talk to the STM32F10x. The Maple acts as a USB to serial interface. I don't know if anyone has written this, but shouldn't be too horrible as most of the pieces of source code exist.
As tesseract says, a USBtiny is a soft implementation of USB, which may make the timing problematic. Also, I don't think it implement a serial device, which is what the STM32F loaders expect to talk to. So I think you'd have to implement a USB serial device on the USBtiny.
Many of the lower-cost JTAG programmers are FTDI USB chips, and much of the work is done by 'bit banging' the FTDI chip to 'wiggle' it's pins to generate JTAG signals.
I believe the dual USB FTDI module you have may work.
Posted 5 years ago # -
Oh USART1 the firmware bootloader the maple uses could be loaded that way. So what file is needed to be loaded or the maple IDE has a option like the arduino one?
I think mu ft2232h module could work as a serial interface I know by default the one I am using works in parrellel 8 bits at a time.
So I imagine the pc would have to tell it to act as a serial device and talk to USART1 to load the Firmware.
What would I do if I just was going to use a arduino's ftdi chip circuit hooked on USART1??? where could I find this documentation?
Posted 5 years ago # -
these are the steps we take to flash a bootloader; hope that's what you're asking for:
1) run make from within the maple-bootloader directory, producing build/maple-boot.bin
2) hook up maple usart1 to ftdi breakout board; we use the sparkfun ones.
3) put maple into serial bootloader mode (press and hold RESET, then BUT, release RESET with BUT still pressed, release BUT).
4) $ python $LIB_MAPLE_HOME/support/stm32loader.py -evw build/maple-boot.bin -p <path to serial port>
Where <path to serial port> gets replaced with the path to the virtual serial port. you can see stm32loader.py's usage for more information. if everything worked, you'll see some output and then "VERIFICATION OK."
Posted 5 years ago # -
Very interesting so the button on pin 32 is BUT. Does that come with the normal IDE Download or are you talking about a download from the subversion?
Ok so I should install python 2.x or 3.x I herd 3 is not backward compatible sometimes.
This is realy useful info is it on the page?
Posted 5 years ago # -
mbolivar - I think the instructions page is less clear about
3) put maple into serial bootloader mode (press and hold RESET, then BUT, release RESET with BUT still pressed, release BUT).
than these instructions, so it would be worth updating the instructions page. (I had to read the datasheet and/or application notes to figure out that sequence of button presses)
josheeg - I believe the stm32loader.py recommends a version of python (I think I used 2.7.x, anyway, it is newer than the one that came with Mac OS X, and is not a 3.x)
Posted 5 years ago # -
that script is available in a github checkout of maple-bootloader and libmaple:
https://github.com/leaflabs/libmaple
https://github.com/leaflabs/maple-bootloaderstm32loader.py is python 2; should be compatible with any reasonably recent version (i.e. 2.5+, although it's likely that 2.4 would also work)
edit: stm32loader.py is in libmaple/support, but you'll need a checkout of maple-bootloader to get a copy of the compiled bootloader (unless you'll be using your own, of course)
Posted 5 years ago # -
gbulmer -- sorry, confused about which instructions page you're referring to?
Posted 5 years ago # -
mbolivar - erm, I'm confused too.
A few weeks ago, we were trying to flash the bootloader (don't ask), and I am certain I found instructions at LeafLabs somewhere. But they were a bit vague over the sequence of events on the reset and BUT buttons. Eventually I read something, maybe an ST application note or RM0008, to disover that the BOOT button is latched several cycles after reset, then we got it to work.
Summary, the advice in this thread about the buttons would have helped, but now I can't find where on leaLabs.com the instructiuons were that we were using. (Doh!)
Posted 5 years ago # -
gbulmer: you're right, there should be a HOWTO on this. we're revamping all of our technical documentation right now; the information on this thread will be present in the new version.
Posted 5 years ago #
Reply
You must log in to post.