New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stm32f103xb interface #257

Open
wants to merge 23 commits into
base: master
from

Conversation

Projects
None yet
7 participants
@c1728p9
Collaborator

c1728p9 commented Apr 16, 2017

Add support for the stm32f103 interface to DAPLink. Thanks, @zoujixing for doing most of the porting work in PR #133. This patch is based on yours but replaces the HAL with the stm32 cube driver so the license is open source. It also replaces the USB driver with an open source version. Finally, it is rebased and configured for NUCLEO boards.

@Awais174

This comment has been minimized.

Show comment
Hide comment
@Awais174

Awais174 May 3, 2017

Thanks @c1728p9 for carrying out this work.
When do you intend to merge this pull request with master?

Awais174 commented May 3, 2017

Thanks @c1728p9 for carrying out this work.
When do you intend to merge this pull request with master?

@c1728p9

This comment has been minimized.

Show comment
Hide comment
@c1728p9

c1728p9 May 3, 2017

Collaborator

CI is down, so once it is working I'll run testing on this and then merge it.

Collaborator

c1728p9 commented May 3, 2017

CI is down, so once it is working I'll run testing on this and then merge it.

@Awais174

This comment has been minimized.

Show comment
Hide comment
@Awais174

Awais174 May 5, 2017

That will be great.
@c1728p9 If possible, could please also add support for target STM32F437VG (1024KB FLASH).

Awais174 commented May 5, 2017

That will be great.
@c1728p9 If possible, could please also add support for target STM32F437VG (1024KB FLASH).

@c1728p9

This comment has been minimized.

Show comment
Hide comment
@c1728p9

c1728p9 Sep 4, 2017

Collaborator

Hi @Awais174, is there a board you had in mind for the STM32F437VG?

Collaborator

c1728p9 commented Sep 4, 2017

Hi @Awais174, is there a board you had in mind for the STM32F437VG?

@Awais174

This comment has been minimized.

Show comment
Hide comment
@Awais174

Awais174 Sep 4, 2017

@c1728p9 u-blox C030 board (either U2XX or N2XX) is based on STM32F437VG as target MCU and STM32F103 as interface MCU.

Awais174 commented Sep 4, 2017

@c1728p9 u-blox C030 board (either U2XX or N2XX) is based on STM32F437VG as target MCU and STM32F103 as interface MCU.

Show outdated Hide outdated source/board/stm32f072rb.c Outdated
/**
* @file stm32f103rb.c
* @brief board ID for the NXP NUCLEO-F103RB board
*

This comment has been minimized.

@therealprof
@therealprof

therealprof Oct 29, 2017

Same here.

/**
* @file stm32f103rb.c
* @brief board ID for the NXP NUCLEO-F103RB board
*

This comment has been minimized.

@therealprof

therealprof Oct 29, 2017

Same here, different file and no NXP Nucleo.

@therealprof

therealprof Oct 29, 2017

Same here, different file and no NXP Nucleo.

/**
* @file stm32f103rb.c
* @brief board ID for the NXP NUCLEO-F103RB board
*

This comment has been minimized.

@therealprof
@therealprof

therealprof Oct 29, 2017

Dito.

/**
* @file stm32f103rb.c
* @brief board ID for the NXP NUCLEO-F103RB board
*

This comment has been minimized.

@therealprof
@therealprof

therealprof Oct 29, 2017

Dito.

/**
* @file stm32f103rb.c
* @brief board ID for the NXP NUCLEO-F103RB board
*

This comment has been minimized.

@therealprof

therealprof Oct 29, 2017

And another time.

@therealprof

therealprof Oct 29, 2017

And another time.

/**
* @file stm32f103rb.c
* @brief board ID for the NXP NUCLEO-F103RB board
*

This comment has been minimized.

@therealprof
@therealprof

therealprof Oct 29, 2017

And again.

@therealprof

This comment has been minimized.

Show comment
Hide comment
@therealprof

therealprof Oct 29, 2017

Any plans to pursuing this any further?

therealprof commented Oct 29, 2017

Any plans to pursuing this any further?

@c1728p9

This comment has been minimized.

Show comment
Hide comment
@c1728p9

c1728p9 Oct 30, 2017

Collaborator

@therealprof yeah eventually, but this is a low priority right now.

Collaborator

c1728p9 commented Oct 30, 2017

@therealprof yeah eventually, but this is a low priority right now.

rsalveti added a commit to rsalveti/DAPLink that referenced this pull request Dec 11, 2017

GD32F103CB: import open source USB driver based on STM32F103XB
Based on the driver published at
ARMmbed#257 with minor modifications in
order to get it to be compatible with GD32F103.

Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com>

rsalveti added a commit to rsalveti/DAPLink that referenced this pull request Dec 11, 2017

GD32F103CB: import open source USB driver based on STM32F103XB
Based on the driver published at
ARMmbed#257 with minor modifications in
order to get it to be compatible with GD32F103.

Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com>

rsalveti added a commit to rsalveti/DAPLink that referenced this pull request Dec 12, 2017

GD32F103CB: import open source USB driver based on STM32F103XB
Based on the driver published at
ARMmbed#257 with minor modifications for
GD32F103.

Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com>

rsalveti added a commit to rsalveti/DAPLink that referenced this pull request Dec 12, 2017

GD32F103CB: import open source USB driver based on STM32F103XB
Based on the driver published at
ARMmbed#257 with minor modifications for
GD32F103.

Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com>

rsalveti added a commit to rsalveti/DAPLink that referenced this pull request Dec 13, 2017

GD32F103CB: import open source USB driver based on STM32F103XB
Based on the driver published at
ARMmbed#257 with minor modifications for
GD32F103.

Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com>
@RobMeades

This comment has been minimized.

Show comment
Hide comment
@RobMeades

RobMeades commented Feb 21, 2018

.

@RobMeades

This comment has been minimized.

Show comment
Hide comment
@RobMeades

RobMeades Feb 28, 2018

Hi Russ. We need to make changes for our C030 product (which uses the STM32F437VG as target MCU and STM32F103 as interface MCU) that rely on this PR being submitted. Is there any way we can help to accelerate its submission?

RobMeades commented Feb 28, 2018

Hi Russ. We need to make changes for our C030 product (which uses the STM32F437VG as target MCU and STM32F103 as interface MCU) that rely on this PR being submitted. Is there any way we can help to accelerate its submission?

@cederom

This comment has been minimized.

Show comment
Hide comment
@cederom

cederom Feb 28, 2018

Collaborator

I can help testing :-)

Collaborator

cederom commented Feb 28, 2018

I can help testing :-)

@findlayfeng findlayfeng referenced this pull request Jul 30, 2018

Open

stm32fxx family hal #465

Awais174 pushed a commit to Awais174/DAPLink that referenced this pull request Sep 10, 2018

zoujixing and others added some commits Apr 22, 2016

stm32f103rb : add lib of stm32f10x
Pull in useful files from the STM32 cube library
STM32Cube_FW_F1_V1.4.0. More specifically:

"source\hic_hal\stm32\stm32f103xb\STM32F1xx_HAL_Driver" is from
    "STM32Cube_FW_F1_V1.4.0\Drivers\STM32F1xx_HAL_Driver"

"source\hic_hal\stm32\stm32f103xb\cmsis" is from
    "STM32Cube_FW_F1_V1.4.0\Drivers\CMSIS\Device\ST\STM32F1xx\Include"

"source\hic_hal\stm32\stm32f103xb\cmsis\system_stm32f1xx.c" is from
    "STM32Cube_FW_F1_V1.4.0\Drivers\CMSIS\Device\ST\STM32F1xx\
    Source\Templates\system_stm32f1xx.c"

"source\hic_hal\stm32\stm32f103xb\armcc\startup_stm32f103xb.S" is from
    "STM32Cube_FW_F1_V1.4.0\Drivers\CMSIS\Device\ST\STM32F1xx\
    Source\Templates\arm\startup_stm32f103xb.s"
Add sdk_init along with a weak implementation
Add calls to sdk_init along with a weak implementation of this
function. This is added in preparation for ST support which uses
it to initialize the cube sdk.
Align hid test addr to prevent undefined behavior
The behavior of unaligned reads and writes for two and four byte
accesses is undefined. Adjust the test address to a 4 byte boundary
so these accesses are aligned.

This fixes hid test failures on the READ32/WRITE32 and READ16/WRITE16
tests cases in hid_test.py.
stm32f103xb : implement hal and add bootloader
Add all the file necessary for the stm32f103xb hic and for it's
bootloader.

Also make the following changes to existing files:
-Add DAPLink info to vector table
-Rename UART_PARITY_* to HAL_UART_PARITY_* to prevent conflicts with
 the existing UART_PARITY_* enumeration.
-Turn off unused modules in the hal configuration
-Add new HIC ID to DAPLink.h and info.py
-Set RTOS clock
-Add entry in project.yaml for bootloader
stm32f103xb : Check in open source USB driver
Add an apache-2 licensed USB driver for the stm32f103xb
stm32f103xb : Run astyle on USB driver
Run astyle on the USB driver so it matches the existing code.

c1728p9 and others added some commits Apr 3, 2017

stm32f103xb : Update USB driver for DAPLink
Make the following changes:
-Replace board specific code in __STM32 and __STM32E with DAPLink
 specific code
-Add cnt parameter to USBD_ReadEP and use this to prevent overflows
-Move USB processing to a thread
stm32f103xb : Fix access to EPxREG
Fix accesses to the EPxREG to prevent bits from being unintentionally
cleared or toggled. Great care must be taken accessing the EPxREG
register since some bits are write zero to clear, some are write one
to toggle and some are normal read and write.
stm32f103xb : Reduce chance of dropped setup pkts
When a SETUP packet comes immediately after a control transfer with a
data in stage, there is a chance that the SETUP packet will be
dropped. This is because no buffers are available to receive the setup
packet. This patch moves control ACK packet processing into the USB
ISR so the RX buffer is prepared for the next setup packet far faster.
This greatly reduces the chance of dropping a setup packet.
stm32f103xb : Process USB TX before USB RX
If TX and RX USB events are pending at the same time, process the TX
event first. This prevents MSD problems from packets being processed
in the wrong order.
stm32f103xb : Increase bootloader size to 48KB
Increase the bootloader size to 48K so it fits and has room to grow.
stm32f103xb : Enable 8MHz MCO for target
Generate an 8MHz clock signal for the target. The target requires this
clock signal to run properly on some nucleo boards.
stm32f103xb : Add initial set of boards
Add ST boards across a range of families. In specific this adds the
ST-Nucleo-F103RB, ST-Nucleo-F072RB, ST-Nucleo-F334R8, ST-Nucleo-F411RE,
ST-Nucleo-L476RG, ST-Nucleo-F746ZG and  ST-Nucleo-F207ZG boards.
stm32f103xb: Allow ST bootloader to be started
Start the ST bootloader if the reset button is pressed on boot.
stm32f103xb: Add padding for ST bootloader
Update post_compute_crc.py to create a legacy binary with the offset
of 0x4000 suitable for use with ST-Link.
Turn on automation and overflow detect by default
Turn on the automation and overflow detection settings by default.
This makes remotely managing devices easier.
Update the STM32F103 interface for master
Make the following changes:
-Update DAP_config.h for new CMSIS-DAP specification for
    48417e9 -
    Updated to latest CMSIS-DAP source from CMSIS 5 with SWO support.
-Add stub gpio_set_board_power which enables board power for
    b508a36 -
    K20 HIC waits until USB is configured to enable target power.
-Use simplified reset functions for
    c1a4545 -
    Simplify reset button handling
@brianesquilona

This comment has been minimized.

Show comment
Hide comment
@brianesquilona

brianesquilona Sep 28, 2018

Collaborator

/morph test

Collaborator

brianesquilona commented Sep 28, 2018

/morph test

@brianesquilona

This comment has been minimized.

Show comment
Hide comment
@brianesquilona

brianesquilona Sep 28, 2018

Collaborator

/morph test

Collaborator

brianesquilona commented Sep 28, 2018

/morph test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment