Image Map Image Map
Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: stm32f103 eForth

  1. #1

    Default stm32f103 eForth

    I thought I'd post this. I've modified Dr. Ting's eForth for the STM32F407 to run on the much more restrictive STM32F103 boards. These are simpler with only 64K of flash and 20K of RAM. These small boards are great for small projects that are OK with these 48 pin parts. I see that one can get them from ali-express for under $2 each. You need a 3.3V serial, like a FTDI or creation of your own from a real serial port, to FLASH these. ( in fact, you could even modify a one of these F103s with a few parts. )
    In any case I've put a working version up on github at prog4004/Blue-Pill. I've posted my FLASH loader as well, written in win32forth but there are a number of loaders available on the web. The code hasn't been cleaned up since I first got it to work so it is a little messy, please excuse the mess. One could write their own version as well in their favorite platform.
    It includes a simple terminal code as well.
    I plan on making some other projects with these little boards. At the last VCF West, one fellow has a PDP-8 emulator as an example. The Altair 8800 was also shown.
    These boards are often called the Blue Pill. They have 32 I/O pins to play with ( 30 if you want to keep your serial terminal ). They have the pins laid out to fit in a 40 pin DIP.
    Dwight

  2. #2
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    27,380
    Blog Entries
    20

    Default

    I've found it's easier to dispense with the serial adapter and simply incorporate the USB CDCACM device driver. That way, a simple USB cable serves to power the device and communicate with it. One popular platform was the Maple "Mini".

    It's worth noting that these little devices run at 72 MHz and are real 32-bit ARM MCUs with 5V tolerant I/O.

  3. #3

    Default

    I believe the Maple "mini" and the Blue Pills are the same. It should be noted that the FLASH can't run at the full 72MHz speed but gets close with a lifo between the core and the FLASH, as well as the core does out of order execution for enhanced speed. Even though, the FLASH is at 36MHz, code is rarely running at half speed. Any timing critical stuff can be run from RAM that is full speed. Being out of order, one needs to be careful with I/O operations that the processor feels need to be out of order. There are ways to ensure correct order though as part of normal ARM. Of course, the processor should be susceptible to MeltDown, if that is an issue .
    This version of eForth runs completely in RAM after boot. This uses up precious RAM, being the eForth uses about 8.75K of the 20K RAM. I expect I'll make another version that has all the construction words like CREATE : ; C, and such in FLASH to remove things from RAM that don't need the advantage.
    One could make a token threaded version that might be even more compact.
    Dwight

  4. #4
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    27,380
    Blog Entries
    20

    Default

    The Maple Minis (I have about 5 of them) are not exactly the same. Pinout is somewhat different and there's no JTAG programming header. The USB is also a bit more quirky, but that's easy to fix with the addition of a resistor. I tend to use the Minis more than the Blue Pills.

    But for general fooling around, I still think that the STM32F4VE boards are the cat's meow. You have pretty much everything on one of those (168MHz, standard programming connector,battery-backed RTC, microSD slot, USB, SPI device header, 512KB external flash...etc.). About the only thing I wish is that they'd ship with the pin headers off so one can have the headers out the bottom (use the F4VE as a module plugging into a larger board).

    There's a STM32F429 board that works like this, but the )(*)&^! pad spacing is 2mm instead of 0.1"
    Last edited by Chuck(G); June 13th, 2018 at 08:36 AM.

  5. #5

    Default

    You can take a small piece of aluminum channel, fill it a little beyond the brim and use that to un-solder the strips.
    Dwight

  6. #6

    Default

    But Chuck, can you buy them for under $2?
    Dwight

  7. #7
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    27,380
    Blog Entries
    20

    Default

    No, of course not--think more like $10. The way I use the F4VE boards now is to mount them with standoffs on a hunk of prototyping board and then wire-wrap to the headers to headers on the prototyping board. A little messy, but easy to reconfigure.

    Sample listing

    The 429 board, that I have lacks the goodies of the F4VE board, as well as having no mounting holes. On the other hand, it's 200MHz with something like a hundred 5V tolerant GPIOs and 8MB of SDRAM thrown in. I'm still looking for a 429/439 board with the features of the F4VE (which is a 407) board.
    Last edited by Chuck(G); June 13th, 2018 at 12:38 PM.

  8. #8

    Default

    Quote Originally Posted by Chuck(G) View Post
    No, of course not--think more like $10. The way I use the F4VE boards now is to mount them with standoffs on a hunk of prototyping board and then wire-wrap to the headers to headers on the prototyping board. A little messy, but easy to reconfigure.

    Sample listing
    Ah, nifty Nice to see some cheap dev boards for microcontrollers with more than a few KB of RAM built in...gonna have to pick one of these up!
    Computers: Amiga 1200, DEC VAXStation 4000/60, DEC MicroPDP-11/73
    Synthesizers: Roland JX-10/SH-09/MT-32/D-50, Yamaha DX7-II/V50/TX7/TG33/FB-01, Korg MS-20 Mini/ARP Odyssey/DW-8000/X5DR, Ensoniq SQ-80, E-mu Proteus/2, Moog Satellite, Oberheim SEM
    "'Legacy code' often differs from its suggested alternative by actually working and scaling." - Bjarne Stroustrup

  9. #9
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    27,380
    Blog Entries
    20

    Default

    If you want to delve into it, get your reading specs polished up--the family reference manual (RM0090) runs to 1422 pages. And then there's the device-specific manual (another 200 pages) and the various development suites (there are several). The learning curve can be pretty steep, but it's worth the price of admission.

  10. #10

    Default

    The manual sizes have little relationship to the size of the chip. The F10x parts have similar size pdfs. They all use different port and sometimes different bits in the ports for the same functions.
    Dwight

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •