This commit is contained in:
V24473
2022-01-11 09:54:08 +08:00
parent 0ca9b0f879
commit b117c0d5c7
97 changed files with 1425 additions and 4 deletions

View File

@@ -0,0 +1,45 @@
/*********************************************************************
* (c) SEGGER Microcontroller GmbH & Co. KG *
* The Embedded Experts *
* www.segger.com *
**********************************************************************/
/*
* ConfigTargetSettings()
* - called before InitTarget()
* - set some global DLL variables to customize the normal connect procedure
*/
int ConfigTargetSettings(void)
{
JLINK_SYS_Report("[ConfigTargetSettings]");
JLINK_CORESIGHT_AddAP(0, CORESIGHT_AHB_AP);
JLINK_CORESIGHT_IndexAHBAPToUse = 0;
CPU=CORTEX_M4;
// force RESET to low
JTAG_ResetPin = 0; // issue a reset of the CPU
return 0;
}
/*
* InitTarget()
* - Replace the target-CPU-auto-find procedure of the J-Link DLL.
*
*/
int InitTarget(void)
{
JLINK_CORESIGHT_WriteAP(JLINK_CORESIGHT_AP_REG_ADDR, 0xE000EDFC);
JLINK_CORESIGHT_WriteAP(JLINK_CORESIGHT_AP_REG_DATA, 0x01000001);
// release RESET
JTAG_ResetPin = 1;
return 0;
}

File diff suppressed because it is too large Load Diff

View File

@@ -18,7 +18,7 @@
"default_tools": [
"stlink"
],
"jlink_device": "STM32F103C8",
"jlink_device": "AT32F403ACG7",
"openocd_extra_args": [
"-c",
"reset_config none"
@@ -29,7 +29,7 @@
"frameworks": [
"cmsis"
],
"name": "Generic F403A",
"name": "Generic_F403A",
"upload": {
"maximum_ram_size": 229376,
"maximum_size": 262144,

View File

@@ -7,7 +7,7 @@
; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html
[env:generic f403a]
[env:generic_f403a]
platform = at32
framework = cmsis
board = generic_f403a

View File

@@ -7,12 +7,15 @@
; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html
[env:generic f403a]
[env:generic_f403a]
platform = at32
framework = cmsis
board = generic_f403a
monitor_speed = 115200 ;serial monitor baudrate
;Use the following for jlink upload
;upload_protocol = jlink
;Use the following for serial upload via bootloader (PA9, PA10)
;upload_protocol = serial
;upload_speed = 115200 ;default: 115200