RT-Thread编程陷阱与防坑指南清单 #6225
Replies: 5 comments
-
双精度浮点问题部分STM32高级芯片具备双精度浮点计算能力,设置方式有所区别,参见: |
Beta Was this translation helpful? Give feedback.
-
慎用RT_IPC_FLAG_FIFO除非你有明确理由,非常关心内核对象等待队列排列顺序的先来后到,否则强烈建议用RT_IPC_FLAG_PRIO |
Beta Was this translation helpful? Give feedback.
-
STM32 CAN Bus 的比特率STM32的CAN驱动里面代码适配时,有预设的总线时钟。需要核查驱动预设的时钟和你使用的板子的总线时钟是否匹配。如果不匹配,则需要自行修改驱动里面的时钟配置选项,否则CAN总线的bitrate会不合预期。 |
Beta Was this translation helpful? Give feedback.
-
scons Windows 平台编译,命令行参数超过 32K 报错规避办法
def ourspawn(sh, escape, cmd, args, e):
newargs = ' '.join(args[1:])
cmdline = cmd + " " + newargs
if (len(cmdline) > 16 * 1024):
f = open('cmd.param', 'w')
f.write(' '.join(args[1:]).replace('\\', '/'))
f.close()
# exec
cmdline = cmd + " @cmd.param"
proc = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, shell = False, env = e)
data, err = proc.communicate()
rv = proc.wait()
if rv != 0:
sys.stderr.write(err)
else:
sys.stdout.write(data)
return rv
if platform.system() == 'Windows':
env['SPAWN'] = ourspawn
import subprocess
import platform |
Beta Was this translation helpful? Give feedback.
-
此issue登记记录在开发过程中遇到的一些使用陷阱,并最好能提供如何规避此类陷阱的方法、思路以及故事:)
Beta Was this translation helpful? Give feedback.
All reactions