dfs卡诺图最简算法
dfs卡诺图最简算法gray.h12345678910111213141516171819202122232425262728#ifndef __GRAY_H__#define __GRAY_H__#include <iostream>#include <string>#ifdef __cplusplusextern "C" {#endifclass Gray {private: int gray_num; int max_num;public: Gray(int num, int max_num); ~Gray(); void add(int num); int result(); std::string to_bin();};#ifdef __cplusplus}#endif#endif // !__GRAY_H__
gray.cpp1234567891011121314151617181920212223242526272829303132333435#include <gra ...
RZN2L使用backtrace时,栈地址不对
RZN2L使用backtrace时,栈地址不对问题在使用RZN2L进行backtrace实验时,发现在进入Abort中断后栈顶指针也发生了很大的变化,猜测是因为RZN2L默认运行在SVC模式,而进入Abort后切换到了IRQ模式,导致栈顶地址错误。
RZN2L在system_init函数设置成SVC模式
1234567__asm volatile ( "cpsr_save: \n" " MRS r0, cpsr \n" /* Read original CPSR value to r0 */ " BIC r0, r0, %[bsp_mode_mask] \n" /* Clear the mode bits */ " ORR r0, r0, %[bsp_svc_mode] \n" /* Set value of SVC mode bit ...
EtherCAT的DC和SM同步如何设置默认选项
EtherCAT的DC和SM同步如何设置默认选项这个地方看顺序,DC在上面,默认选项就是DC
1234567891011121314<Dc> <OpMode> <Name>DC</Name> <Desc>DC-Synchron</Desc> <AssignActivate>#x300</AssignActivate> <CycleTimeSync0 Factor="1">0</CycleTimeSync0> <CycleTimeSync1 Factor="1">0</CycleTimeSync1> </OpMode> <OpMode> <Name>Synchron</Name> <Desc>SM-Synchron</Desc> <AssignActivate>#x0</AssignActivate&g ...
codesys添加从站自动加载轴
codesys添加从站自动加载轴在 codesys 的 devices.xml 文件中找到 ,在后面添加
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 <Connector moduleType="1279" interface="Common.SoftMotion.EtherCAT.JMC"> <Slot allowEmpty="false" count="1"> <DefaultModule> <DeviceIdentification deviceType="1027" deviceId="0000 0077" version="4.6.1.0" /> </DefaultModule> ...
ld链接文件解析
ld链接文件解析123456789101112131415161718192021222324252627282930313233343536373839404142434445464748.flash_contents 0x6000004C : AT (0x6000004C){ _mtext = .; . = . + (_text_end - _text_start); _mdummy = .; . = . + (_dummy_end - _dummy_start); _mdata = .; . = . + (_data_end - _data_start); flash_contents_end = .;} > xSPI0_CS0_SPACE.text 0x00102000 : AT (_mtext){ _text_start = .; _fvector_start = .; KEEP(*(.intvec)) _fvector_end = .; _dummy_star ...
elf固件格式转换
elf固件格式转换hex转bin1arm-none-eabi-objcopy.exe -I ihex output.hex -O binary output.bin
elf转hex1arm-none-eabi-objcopy.exe -O ihex output.elf
cmbacktrace分析
cmbacktrace分析分析以瑞萨RZN2L举例,在发生错误时,由于默认情况下RZN2L运行在SVC模式,所以要先切换回SVC模式,栈才对应。
123456789101112131415161718192021void Default_Handler (void){ /** A error has occurred. The user will need to investigate the cause. Common problems are stack corruption * or use of an invalid pointer. Use the Fault Status window in e2 studio or manually check the fault status * registers for more information. */ __asm volatile ( "mrs r0, cpsr \n" "bic r0, r0, %[bsp_mode ...
机场测速软件
机场测速软件fullclash[[https://github.com/AirportR/fulltclash]]
安装时遇到的问题[[2.PermanentNotes/1.Study/0.Common/5.解决pip安装报错microsoft visual c++ 14.0 or greater is required问题|5.解决pip安装报错microsoft visual c++ 14.0 or greater is required问题]]
tk流媒体检测
流媒体检测tk1bash <(curl -s https://raw.githubusercontent.com/lmc999/TikTokCheck/main/tiktok.sh)
region1bash <(curl -L -s check.unlock.media)
npm设置镜像源
npm设置镜像源查询当前使用的镜像源1npm config get registry
设置为淘宝镜像源1npm config set registry https://registry.npmmirror.com/
还原为官方镜像源1npm config set registry https://registry.npmjs.org