[Solved] Conversion of Not so good value STM32F103C8T6 Board to BMP

User avatar
Rick Kimball
Posts: 1058
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Conversion of Not so good value STM32F103C8T6 Board to BMP

Post by Rick Kimball » Mon Sep 25, 2017 3:42 am

you have both 3v3 and usb connected? It should be one or the other but not both.
-rick

flodejr
Posts: 29
Joined: Sat Sep 16, 2017 2:46 pm

Re: Conversion of Not so good value STM32F103C8T6 Board to BMP

Post by flodejr » Mon Sep 25, 2017 3:57 am

Rick Kimball wrote:
Mon Sep 25, 2017 3:36 am
Are there pull up resistors on those pins, as they were marked i2c? if so,maybe try other pins

you have both 3v3 and usb connected? It should be one or the other but not both.
I have tested, the two i2c pins does not have pull up resistors on them and I am only using the USB power, no external power supply. I have tried mapping to the SPI pins as well and I get the same results. There must be some hardcoded pins in the firmware somewhere and I am trying to search for them. so far I have found like PC14, PC15 and PC13 for version verifications and also PA15 for some reset function.

User avatar
Rick Kimball
Posts: 1058
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Conversion of Not so good value STM32F103C8T6 Board to BMP

Post by Rick Kimball » Mon Sep 25, 2017 4:00 am

If you flash a bluepill with this blackmagic.bin you have created does it work?
-rick

User avatar
RogerClark
Posts: 7494
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Conversion of Not so good value STM32F103C8T6 Board to BMP

Post by RogerClark » Mon Sep 25, 2017 5:12 am

@flodejr

Sorry. I miss-read the title.

I think you'd be better off going onto the BMP chat room on Gitter

https://gitter.im/blacksphere/blackmagic

Those guys know a lot more about building the BMP etc

flodejr
Posts: 29
Joined: Sat Sep 16, 2017 2:46 pm

Re: Conversion of Not so good value STM32F103C8T6 Board to BMP

Post by flodejr » Mon Sep 25, 2017 5:51 am

Hi Rick,

Thanks for your help. Very much appreciated. I got it working, it was the target after all. I had to press and hold the reset while scanning and then attach and release the reset together. I wonder why the OpenOCD software on the PC is able to do the reset through software and not the OpenCD software on the BMP (I believe it is OCD server running on the BMP right?)

User avatar
Rick Kimball
Posts: 1058
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: [Solved] Conversion of Not so good value STM32F103C8T6 Board to BMP

Post by Rick Kimball » Mon Sep 25, 2017 12:46 pm

BMP implements a gdb remote server protocol server, as does openocd and the texanne st-util code. Here are some links that explain what GDB RSP is all about:
http://www.embecosm.com/appnotes/ean4/e ... sue-2.html
http://neptune.billgatliff.com/debugger.html

Openocd and the Texanne code are desktop programs that provides a gdb proxy between a network socket (arm-none-eabi-gdb connects to the socket) and the stlink hardware connected via USB. Both programs talk directly to the USB interface of STLINK device using an ST proprietary API. They take the GDB RSP commands and turn them into USB commands that are handled by the STLINK device.

BMP provides access via the serial port on the "Not so good value" stm32f103 device. In this case, the arm-none-eabi-gdb connects to the serial port instead of a socket. The BMP firmware takes the GDB RSP commands and toggles the SWD_DIO/SWD_CLK pins on your "Not so good value" board to implement the SWD Protocol embedded on your target chip.

I'm wondering which board and upload options you have selected. Those choices affect how the swd/jtag pins are configured in libmaple. The define CONFIG_MAPLE_MINI_NO_DISABLE_DEBUG is what controls this and often gets in the way of smooth debugging. I've certainly got a target board in a mode where I could not debug it even using an stlink dongle. However you can always get access, even if you have disabled the pins, by setting the BOOT1 pin HIGH and pressing reset. That puts it into system boot mode, which does allow use of the SWD/JTAG pins.

The maple boards are configured to turn off the debug pins so all of the pins can be used. The generic boards, depending on how you compile, may or may not do the same thing. It depends on which uploads option you select when compiling.
-rick

Post Reply