[技术问答] 关于《使用VS code搭建AC781x开发环境》文档的疑问

[复制链接]
1452|13
 楼主| 渔夫的烟斗 发表于 2020-12-10 23:41 | 显示全部楼层 |阅读模式
code, AC, ce, ARM, ev
本帖最后由 渔夫的烟斗 于 2020-12-15 19:45 编辑

直接用vscode打开官方例程,进行make指令,错误如下:
  1. PS I:\desktop_cpy\ac7811\develop_tool_demo20200711(AC781x)\develop_tool_demo20200711\VSCode_Demo> make
  2. process_begin: CreateProcess(NULL, printf "  AS      Device/Source/ARM/startup_ac78xx.s\n", ...) failed.
  3. make (e=2): 系统找不到指定的文件。
  4. make: *** [makefile:115: Device/Source/ARM/startup_ac78xx.o] Error 2
arm-none-eabi-gcc的路径已在JSON进行更改。



另附官方说明,望能帮忙解决。
(MDK公司不让用。。。)


以下为12/14更新


用git_bash 进行make,提示如下:

make_by_git_bash.jpg
在vs code下进行make,提示如下:
vscode-make.jpg
make版本
make-v.jpg

arm-none-eabi-gcc版本
gcc-v.jpg




以下为12/15更新
解决方法
  • 屏蔽makefile文件中与printf 相关的语句
  • printf替换成echo

(公司的电脑就不会这样,根本问题还未找出)


!附上工程,待有心人检验

git bash

git bash

使用VS code搭建AC78xx开发环境.pdf

1.09 MB, 下载次数: 53

官方文档

develop_tool_demo20200711(AC781x).rar

4.79 MB, 下载次数: 22

官方例程,最后一个有做修改

chenqianqian 发表于 2020-12-11 08:09 来自手机 | 显示全部楼层
最终解决了吗,
 楼主| 渔夫的烟斗 发表于 2020-12-11 08:28 | 显示全部楼层

没哟,等官方的人来解决一下
JasonLee27 发表于 2020-12-11 15:37 | 显示全部楼层
渔夫的烟斗 发表于 2020-12-11 08:28
没哟,等官方的人来解决一下

应该是启动文件没参与编译或者没生成.o文件,可以先看下是否是后缀大小写的问题
里面有晴雨 发表于 2020-12-11 18:03 | 显示全部楼层
最终问题解决了吗?
 楼主| 渔夫的烟斗 发表于 2020-12-11 18:51 | 显示全部楼层
JasonLee27 发表于 2020-12-11 15:37
应该是启动文件没参与编译或者没生成.o文件,可以先看下是否是后缀大小写的问题 ...

那有错是以哪个为准?makefile还是文件自身的后缀?
 楼主| 渔夫的烟斗 发表于 2020-12-11 18:53 | 显示全部楼层
JasonLee27 发表于 2020-12-11 15:37
应该是启动文件没参与编译或者没生成.o文件,可以先看下是否是后缀大小写的问题 ...

后缀都是正常的
JasonLee27 发表于 2020-12-14 14:38 | 显示全部楼层

  1. C:\Users\ATC6180\Desktop\AC781x资料\例程\develop_tool_demo20200711\VSCode_Demo>make
  2.   AS      Device/Source/ARM/startup_ac78xx.s
  3.   CC      Device/Source/ac78xx_ckgen.c
  4.   CC      Device/Source/ac78xx_spm.c
  5.   CC      Device/Source/system_ac78xx.c
  6. Device/Source/system_ac78xx.c: In function 'SysStandby':
  7. Device/Source/system_ac78xx.c:459:5: warning: implicit declaration of function 'asm' [-Wimplicit-function-declaration]
  8.      asm("WFI");
  9.      ^~~
  10.   CC      Device/Source/ac78xx_debugout.c
  11. Device/Source/ac78xx_debugout.c: In function 'InitDebug':
  12. Device/Source/ac78xx_debugout.c:153:5: warning: implicit declaration of function 'GPIO_SetFunc'; did you mean 'UART_SetFrac'? [-Wimplicit-function-declaration]
  13.      GPIO_SetFunc(49, 1);
  14.      ^~~~~~~~~~~~
  15.      UART_SetFrac
  16. In file included from ./Drivers/UART/ac78xx_uart.h:40:0,
  17.                  from Device/Source/ac78xx_debugout.c:84:
  18. Device/Source/ac78xx_debugout.c: At top level:
  19. ./Drivers/UART/ac78xx_uart_reg.h:1122:22: warning: 'UART_SetFrac' declared 'static' but never defined [-Wunused-function]
  20. __STATIC_INLINE void UART_SetFrac(UART_Type *UARTx, uint8_t uartFracL, uint8_t uartFracM);
  21.                       ^~~~~~~~~~~~
  22. Device/Source/ac78xx_debugout.c: In function 'debug_putchar':
  23. Device/Source/ac78xx_debugout.c:104:1: warning: control reaches end of non-void function [-Wreturn-type]
  24. }
  25. ^
  26.   CC      Device/Source/syscalls.c
  27.   CC      Drivers/DMA/ac78xx_dma.c
  28.   CC      Drivers/GPIO/ac78xx_gpio.c
  29.   CC      Drivers/TIMER/ac78xx_timer.c
  30.   CC      Drivers/UART/ac78xx_uart.c
  31. In file included from Drivers/UART/ac78xx_uart.c:40:0:
  32. Drivers/UART/ac78xx_uart_reg.h:1122:22: warning: 'UART_SetFrac' declared 'static' but never defined [-Wunused-function]
  33. __STATIC_INLINE void UART_SetFrac(UART_Type *UARTx, uint8_t uartFracL, uint8_t uartFracM);
  34.                       ^~~~~~~~~~~~
  35.   CC      Drivers/WDG/ac78xx_wdg.c
  36.   CC      App/main.c
  37. In file included from ./Drivers/UART/ac78xx_uart.h:40:0,
  38.                  from App/main.c:50:
  39. ./Drivers/UART/ac78xx_uart_reg.h:1122:22: warning: 'UART_SetFrac' declared 'static' but never defined [-Wunused-function]
  40. __STATIC_INLINE void UART_SetFrac(UART_Type *UARTx, uint8_t uartFracL, uint8_t uartFracM);
  41.                       ^~~~~~~~~~~~
  42. In file included from App/main.c:49:0:
  43. ./Drivers/TIMER/ac78xx_timer.h:57:27: warning: 's_timerCallback' defined but not used [-Wunused-variable]
  44. static TIMER_CallbackType s_timerCallback[8] = {(TIMER_CallbackType)NULL};
  45.                            ^~~~~~~~~~~~~~~
  46.   LD      DEMO.elf
  47.   OBJCOPY DEMO.bin
  48.   OBJCOPY DEMO.hex

  49. C:\Users\ATC6180\Desktop\AC781x资料\例程\develop_tool_demo20200711\VSCode_Demo>


你从官网下的例程,如果你已经有了gcc和make的环境,直接cmd命令行执行make,应该是可以编译成功的
 楼主| 渔夫的烟斗 发表于 2020-12-14 21:13 | 显示全部楼层
JasonLee27 发表于 2020-12-14 14:38
你从官网下的例程,如果你已经有了gcc和make的环境,直接cmd命令行执行make,应该是可以编译成功的 ...

抱歉,确实是不成功的。
jiangyongabc 发表于 2020-12-16 07:55 来自手机 | 显示全部楼层
可以用VS直接开发?
JasonLee27 发表于 2020-12-17 09:47 | 显示全部楼层
你修改了哪些部分后可以正常编译的?
nullptr 发表于 2021-1-20 22:12 | 显示全部楼层
VS code 上有插件的,比如 eide , 只需要设置一下编译器路径就可以开始了,支持 armcc, gcc 等
这是华大的 HC32L110 的一个例子,可以利用 cortex-debug 插件在上面调试


调试

调试

评论

嫌自己配 makefile 太麻烦的,可以用这个插件; 如果要直接打开 keil 项目,可以用 keil-assistant; 这样就能体验到 vscode 强大的编辑功能了  发表于 2021-1-20 22:18
您需要登录后才可以回帖 登录 | 注册

本版积分规则

37

主题

185

帖子

2

粉丝
快速回复 在线客服 返回列表 返回顶部