Porting to a low-end STM32F103TB

Posted on
  • (reposted from issue #711 on GitHub)

    I'm trying to add a definition for this HY-TinySTM103T board, which is an STM32F103xB in a 36-pin package. The package type I'm using in the board .py file is VFQFPN36.

    First off - I get a working build when using a serial port (yeay!). Now I'm trying to get USB working. The board has a discovery pin enabling circuit on A0, so I adjusted that, as well as the LED (and no button).

    With USB, the binary size is 123088 (I'm building on Mac OSX, the size check in the makefile fails with "gdu not found").

    But there's something odd with the auto-generated jspininfo files:

    # define JSH_PIN_COUNT 80
    
    # define JSH_PORTA_COUNT 16
    # define JSH_PORTB_COUNT 16
    # define JSH_PORTC_COUNT 16
    # define JSH_PORTD_COUNT 16
    # define JSH_PORTE_COUNT 16
    # define JSH_PORTF_COUNT 0
    

    Not sure this is related, but for some reason I can't get the USB device to appear. The LED (which is on A1), does light up as expected on reset (it's active low - I was able to toggle in in the USART build).

    I can't quite figure out what's going on - some help would be appreciated :)

    -jcw

  • For the record: the USB problem was resolved by switching to gcc 4.8.

    This one works (from the Arduino IDE 1.6.5's Due package):
    gcc version 4.8.3 20140228 (release) [ARM/embedded-4_8-branch revision 208322]

    ... while this one fails (installed from https://launchpad.net/gcc-arm-embedded):­
    gcc version 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 227977]

  • Great! Glad you got it sorted!

    If you ever do figure out what the problem is, please could you let me know? Last time this happened, the compiler had re-ordered some register accesses that were meant to be in sequence and I had to add a 'fence' command into ST's peripheral library.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Porting to a low-end STM32F103TB

Posted by Avatar for jcw @jcw

Actions