改用三楼的那个也是一样,编译没问题,链接出错。. I" y7 I5 R& z' d9 M
linking...$ ?. ^, U: R# c- _- j$ N
.\CMSIS-DAP\CMSIS_DAP.axf: Error: L9937E: RL-ARM is not allowed with this license& j0 z' z0 ^5 a3 [* m- U4 Q0 y
.\CMSIS-DAP\CMSIS_DAP.axf: Error: L9937E: RL-ARM is not allowed with this license M# K7 S9 {1 N$ ?3 j3 Q.\CMSIS-DAP\CMSIS_DAP.axf: Error: L9937E: RL-ARM is not allowed with this license 8 A% U* O* R2 ?3 ]% H.\CMSIS-DAP\CMSIS_DAP.axf: Error: L9937E: RL-ARM is not allowed with this license' g7 r, e% K' r8 {# R
.\CMSIS-DAP\CMSIS_DAP.axf: Error: L9937E: RL-ARM is not allowed with this license
不好意思,今天刚刚看到,您的问题解决了吗。
这个似乎不难,利用全局查找私有代码,将所有UART2 / USART2相关的代码,改成UART3 / USART3试一试。
改动的代码:
DAP_Config.h:
#define SWO_UART 0
#define USART_CDC_CLOCK(state) RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1, state)
#define USART_CDC_GPIO_CLOCK(state) RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, state)
#define USART_CDC_REMAP() /* GPIO_PinRemapConfig(..., ENABLE) */
#define USART_CDC_PORT 1 //USART1; k+ n& r/ C, e8 M3 T; A& g
#define USART_CDC_GPIO GPIOA0 |; a9 F. x4 h, m; Q/ ^
#define USART_CDC_TX_PIN_MASK GPIO_Pin_94 x9 u8 Q* H0 K! C
#define USART_CDC_RX_PIN_MASK GPIO_Pin_10: `1 Y' ?5 A2 u4 r1 t. V
#define USART_CDC_IRQn USART1_IRQn' Q# S. w' m) S6 S! D: P
#define USART_CDC_IRQHandler USART1_IRQHandler
#define USART_CDC_BUFFER_SIZE (1024) /* Size of Receive and Transmit buffers MUST BE 2^n */
2 O" N# x% B9 |& l
#define PIN_USB_CONNECT_RCC RCC_APB2ENR_IOPAEN
#define PIN_USB_CONNECT_PORT GPIOA8 F4 e4 ^# q! a! I: `
#define PIN_USB_CONNECT_PIN 8
// TDI Pin (output). i- u& U7 o6 ?7 P! q7 I& D6 c
#define PIN_TDI_PORT GPIOA
#define PIN_TDI_PIN 7
// SWDIO/TMS Pin7 C2 g* q9 Q+ i0 B; ~
#define PIN_SWDIO_TMS_PORT GPIOA
#define PIN_SWDIO_TMS_PIN 11 P) Q: |/ G3 t6 P: r
// SWCLK/TCK Pin
#define PIN_SWCLK_TCK_PORT GPIOA
#define PIN_SWCLK_TCK_PIN 5% Y, v2 s6 \$ M
// TDO/SWO Pin (input) //remap USART1_Rx_Pin to PB7 for SWO! H- _, b& I3 y% R
#define PIN_TDO_PORT GPIOB
#define PIN_TDO_PIN 7
// nRESET Pin
#define PIN_nRESET_PORT GPIOB; W1 r% X% R2 i4 {/ U
#define PIN_nRESET_PIN 0* _& b h# ?' X- T* o
因为串口1的Rx线被SWO/TDO占用了。
这个,我只能给一点提示,因为没有试过,没有办法具体说出正确的改动方法。
由于SWO/TDO的引脚PB7,使用了USART1的Rx线的功能,您要改动VCP使用USART1,就要把SWO/TDO搬到USART2的Rx线去,或者禁止SWO和JTAG功能。 需要改动的地方比较多。
如果,不想麻烦,建议另买一块Bluepill小板(研究源码),或者STLINKv2的山寨仿真器刷DAP(这个实用),都是十多元钱事儿。$ W3 b8 h! W; W* }, [$ v
好的,我再研究下,谢谢回复,主要是想废物利用下
大佬,是我的板子芯片问题吗,我用好的DAPLINK给这个蓝色板子刷了好几个DAPlin固件都是不能在KEIL中识别到,但是电脑可以显示出U盘,和硬件管理那可以显示出串口,可以用疮口下载,就是不能在keil中识别,买了两块最小系统板板子都不能识别,有一个板子还是在优信买的。折腾了好久都没成功,怀疑是不是芯片问题
linking...$ ?. ^, U: R# c- _- j$ N
.\CMSIS-DAP\CMSIS_DAP.axf: Error: L9937E: RL-ARM is not allowed with this license& j0 z' z0 ^5 a3 [* m- U4 Q0 y
.\CMSIS-DAP\CMSIS_DAP.axf: Error: L9937E: RL-ARM is not allowed with this license
.\CMSIS-DAP\CMSIS_DAP.axf: Error: L9937E: RL-ARM is not allowed with this license
.\CMSIS-DAP\CMSIS_DAP.axf: Error: L9937E: RL-ARM is not allowed with this license' g7 r, e% K' r8 {# R
.\CMSIS-DAP\CMSIS_DAP.axf: Error: L9937E: RL-ARM is not allowed with this license
用MDKv5.xx试一试,安装MDKv4兼容包。