文章目录
- GD - EmbeddedBuilder_v1.4.1.23782工程中的gdc名称必须和工程名称一致
- 概述
- 笔记
- 总结
- END
GD - EmbeddedBuilder_v1.4.1.23782工程中的gdc名称必须和工程名称一致
概述
在看EmbeddedBuilder_v1.4.1.23782自带的demo工程。
看到 D:\EmbeddedBuilder_v1.4.1.23782\examples\GD32F3x0\examples\EXTI\EXTI_Key_external_interrupt_mode
发现双击.gdc无法打开,报错。
打不开.gdc的图形化UI, 导致后续无法生成代码,也就不能编译工程, 单步调试和比对图形化配置了。
那下面就没办法好好的玩了。
笔记
向GD官方上报了bug, 人家给出了临时解决方案。
问题原因 - EmbeddedBuilder的工程和.gdc名称不一样,就无法双击打开.gdc文件。
官方例子工程名称为 EXTI_Key_external_interrupt_mode
例子工程自带的.gdc名称为 Key_external_interrupt_mode
按照官方的解决方法,将.gdc改名为 EXTI_Key_external_interrupt_mode.gdc,使.gdc名称和工程名称一致。
再双击打开.gdc, 成功
产生代码成功
这就可以继续学习官方例子工程中如何图形化配置寄存器。
再配合手头的GD32350R_EVAL,就可以单步调试了。
编译了一下,有些错误
16:02:17 **** Build of configuration GD ARM MCU Debug for project EXTI_Key_external_interrupt_mode ****
make -j16 all
Building file: ../src/gd32f3x0_hal_init.c
Building file: ../src/gd32f3x0_hal_it.c
Invoking: GD ARM MCU C Compiler
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g3 -std=gnu11 -DGD32F3X0 -DGD32F350 -I"../inc" -I"../firmware/cmsis/inc" -I"../firmware/gd32f3x0_hal_peripheral/Include" -MMD -MP -MF"src/gd32f3x0_hal_init.d" -MT"src/gd32f3x0_hal_init.o" -Wa,-adhlns=src/gd32f3x0_hal_init.o.lst -c -o "src/gd32f3x0_hal_init.o" "../src/gd32f3x0_hal_init.c"
Invoking: GD ARM MCU C Compiler
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g3 -std=gnu11 -DGD32F3X0 -DGD32F350 -I"../inc" -I"../firmware/cmsis/inc" -I"../firmware/gd32f3x0_hal_peripheral/Include" -MMD -MP -MF"src/gd32f3x0_hal_it.d" -MT"src/gd32f3x0_hal_it.o" -Wa,-adhlns=src/gd32f3x0_hal_it.o.lst -c -o "src/gd32f3x0_hal_it.o" "../src/gd32f3x0_hal_it.c"
Building file: ../src/main.c
Building file: ../firmware/gd32f3x0_hal_peripheral/Source/gd32f3x0_hal_adc.c
Invoking: GD ARM MCU C Compiler
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g3 -std=gnu11 -DGD32F3X0 -DGD32F350 -I"../inc" -I"../firmware/cmsis/inc" -I"../firmware/gd32f3x0_hal_peripheral/Include" -MMD -MP -MF"src/main.d" -MT"src/main.o" -Wa,-adhlns=src/main.o.lst -c -o "src/main.o" "../src/main.c"
Invoking: GD ARM MCU C Compiler
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g3 -std=gnu11 -DGD32F3X0 -DGD32F350 -I"../inc" -I"../firmware/cmsis/inc" -I"../firmware/gd32f3x0_hal_peripheral/Include" -MMD -MP -MF"firmware/gd32f3x0_hal_peripheral/Source/gd32f3x0_hal_adc.d" -MT"firmware/gd32f3x0_hal_peripheral/Source/gd32f3x0_hal_adc.o" -Wa,-adhlns=firmware/gd32f3x0_hal_peripheral/Source/gd32f3x0_hal_adc.o.lst -c -o "firmware/gd32f3x0_hal_peripheral/Source/gd32f3x0_hal_adc.o" "../firmware/gd32f3x0_hal_peripheral/Source/gd32f3x0_hal_adc.c"
Building file: ../firmware/gd32f3x0_hal_peripheral/Source/gd32f3x0_hal_cec.c
Building file: ../firmware/gd32f3x0_hal_peripheral/Source/gd32f3x0_hal_cmp.c
Finished building: ../src/gd32f3x0_hal_init.c
../src/main.c: In function 's_gpio_irq_handle':
../src/main.c:38:9: warning: implicit declaration of function 'gd_eval_led_toggle' [-Wimplicit-function-declaration]
38 | gd_eval_led_toggle(LED2);
| ^~~~~~~~~~~~~~~~~~
../src/main.c:38:28: error: 'LED2' undeclared (first use in this function)
38 | gd_eval_led_toggle(LED2);
| ^~~~
../src/main.c:38:28: note: each undeclared identifier is reported only once for each function it appears in
../src/main.c: In function 'main':
../src/main.c:63:5: warning: implicit declaration of function 'gd_eval_com_init' [-Wimplicit-function-declaration]
63 | gd_eval_com_init(EVAL_COM);
| ^~~~~~~~~~~~~~~~
../src/main.c:63:22: error: 'EVAL_COM' undeclared (first use in this function)
63 | gd_eval_com_init(EVAL_COM);
| ^~~~~~~~
../src/main.c:64:5: warning: implicit declaration of function 'gd_eval_led_init' [-Wimplicit-function-declaration]
64 | gd_eval_led_init(LED1);
| ^~~~~~~~~~~~~~~~
../src/main.c:64:22: error: 'LED1' undeclared (first use in this function)
64 | gd_eval_led_init(LED1);
| ^~~~
../src/main.c:65:22: error: 'LED2' undeclared (first use in this function)
65 | gd_eval_led_init(LED2);
| ^~~~
../src/main.c:66:22: error: 'LED3' undeclared (first use in this function)
66 | gd_eval_led_init(LED3);
| ^~~~
../src/main.c:67:22: error: 'LED4' undeclared (first use in this function)
67 | gd_eval_led_init(LED4);
| ^~~~
../src/main.c:68:5: warning: implicit declaration of function 'gd_eval_led_on' [-Wimplicit-function-declaration]
68 | gd_eval_led_on(LED1);
| ^~~~~~~~~~~~~~
../src/main.c:69:5: warning: implicit declaration of function 'gd_eval_key_init' [-Wimplicit-function-declaration]
69 | gd_eval_key_init(KEY_TAMPER,KEY_MODE_EXTI);
| ^~~~~~~~~~~~~~~~
../src/main.c:69:22: error: 'KEY_TAMPER' undeclared (first use in this function)
69 | gd_eval_key_init(KEY_TAMPER,KEY_MODE_EXTI);
| ^~~~~~~~~~
../src/main.c:69:33: error: 'KEY_MODE_EXTI' undeclared (first use in this function)
69 | gd_eval_key_init(KEY_TAMPER,KEY_MODE_EXTI);
| ^~~~~~~~~~~~~
Finished building: ../src/gd32f3x0_hal_it.c
make: *** [src/subdir.mk:27: src/main.o] Error 1
make: *** Waiting for unfinished jobs....
Invoking: GD ARM MCU C Compiler
Invoking: GD ARM MCU C Compiler
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g3 -std=gnu11 -DGD32F3X0 -DGD32F350 -I"../inc" -I"../firmware/cmsis/inc" -I"../firmware/gd32f3x0_hal_peripheral/Include" -MMD -MP -MF"firmware/gd32f3x0_hal_peripheral/Source/gd32f3x0_hal_cec.d" -MT"firmware/gd32f3x0_hal_peripheral/Source/gd32f3x0_hal_cec.o" -Wa,-adhlns=firmware/gd32f3x0_hal_peripheral/Source/gd32f3x0_hal_cec.o.lst -c -o "firmware/gd32f3x0_hal_peripheral/Source/gd32f3x0_hal_cec.o" "../firmware/gd32f3x0_hal_peripheral/Source/gd32f3x0_hal_cec.c"
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g3 -std=gnu11 -DGD32F3X0 -DGD32F350 -I"../inc" -I"../firmware/cmsis/inc" -I"../firmware/gd32f3x0_hal_peripheral/Include" -MMD -MP -MF"firmware/gd32f3x0_hal_peripheral/Source/gd32f3x0_hal_cmp.d" -MT"firmware/gd32f3x0_hal_peripheral/Source/gd32f3x0_hal_cmp.o" -Wa,-adhlns=firmware/gd32f3x0_hal_peripheral/Source/gd32f3x0_hal_cmp.o.lst -c -o "firmware/gd32f3x0_hal_peripheral/Source/gd32f3x0_hal_cmp.o" "../firmware/gd32f3x0_hal_peripheral/Source/gd32f3x0_hal_cmp.c"
Finished building: ../firmware/gd32f3x0_hal_peripheral/Source/gd32f3x0_hal_adc.c
Finished building: ../firmware/gd32f3x0_hal_peripheral/Source/gd32f3x0_hal_cec.c
Finished building: ../firmware/gd32f3x0_hal_peripheral/Source/gd32f3x0_hal_cmp.c
"make -j16 all" terminated with exit code 2. Build might be incomplete.
16:02:19 Build Failed. 10 errors, 5 warnings. (took 1s.840ms)
不过这些错误,都是没有将官方开发板(GD32350R_EVAL)实现的管脚定义和函数库引用进来,不是大问题。自己从GD32350R_EVAL开发板自带的正常工程中将这些引脚定义和库实现拷贝过来就行。
总结
GD官方服务NB, 响应迅速,上报的bug都有反馈和临时解决方法。
必须给GD官方点个大大的赞!