发现把楼主的代码拷入Linux中编译出现好多问题呢,以前都是在WIN下用KEIL等软件,现在这个都不知道怎么调试了
现在贴上错误信息,烦请解决下,谢谢!
另外如果linux中调试有跟踪函数功能就好了,就像用了什么函数,keil中电机该函数然后“go to define”就能找到该函数的定义了。
GCC.GDB调试真心用不习惯啊~
另外helper提供的内核中默认开启了PWM设备驱动么,貌似你默认已经打开这个设备了,然后在使用的。
另外想问一句,代码编译成功后放在NFS共享文件夹下直接运行./breathing就可以么,有点不是很理解,这方面。
看了其他坛友的制作方式是通过SD卡通过从SD卡启动来完成得,这个很好理解就像单片机一样。
先谢谢了~
- root@ubuntu:/help2416_test/breath_20140726# arm-linux-gcc breathing.c -o breathing
- breathing.c:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
- In file included from /Software/arm-jyxtec-linux-gnueabi/bin/../arm-jyxtec-linux-gnueabi/sysroot/usr/include/bits/fcntl.h:25,
- from /Software/arm-jyxtec-linux-gnueabi/bin/../arm-jyxtec-linux-gnueabi/sysroot/usr/include/fcntl.h:34,
- from breathing.c:3:
- /Software/arm-jyxtec-linux-gnueabi/bin/../arm-jyxtec-linux-gnueabi/sysroot/usr/include/sys/types.h:35: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'u_char'
- breathing.c: In function 'main':
- breathing.c:33: error: stray '\302' in program
- breathing.c:33: error: stray '\266' in program
- breathing.c:33: error: 'ms' undeclared (first use in this function)
- breathing.c:33: error: (Each undeclared identifier is reported only once
- breathing.c:33: error: for each function it appears in.)
- root@ubuntu:/help2416_test/breath_20140726# vi breathing.c
- root@ubuntu:/help2416_test/breath_20140726# arm-linux-gcc breathing.c -o breathing
- breathing.c:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
- In file included from /Software/arm-jyxtec-linux-gnueabi/bin/../arm-jyxtec-linux-gnueabi/sysroot/usr/include/bits/fcntl.h:25,
- from /Software/arm-jyxtec-linux-gnueabi/bin/../arm-jyxtec-linux-gnueabi/sysroot/usr/include/fcntl.h:34,
- from breathing.c:3:
- /Software/arm-jyxtec-linux-gnueabi/bin/../arm-jyxtec-linux-gnueabi/sysroot/usr/include/sys/types.h:35: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'u_char'
- breathing.c: In function 'main':
- breathing.c:33: error: 'ms' undeclared (first use in this function)
- breathing.c:33: error: (Each undeclared identifier is reported only once
- breathing.c:33: error: for each function it appears in.)
- root@ubuntu:/help2416_test/breath_20140726#
复制代码
|