查看EFM32的源代码
←
EFM32
跳转到:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您刚才请求的操作只有这个用户组中的用户才能使用:
用户
您可以查看并复制此页面的源代码:
=== OpenOCD === [http://www.openocd.org/doc/html/Flash-Commands.html OpenOCD Doc] [https://www.silabs.com/community/software/simplicity-studio/forum.topic.html/efm32_developmentde-LqeK UserData support patch] [https://www.allaboutcircuits.com/technical-articles/getting-started-with-openocd-using-ft2232h-adapter-for-swd-debugging/ FT2232H OpenOCD] [https://mindchasers.com/dev/openocd-darsena-windows Build OpenOCD in Windows] https://elinux.org/Compiling_OpenOCD_Win7 [https://www.allaboutcircuits.com/technical-articles/getting-started-with-openocd-using-ft2232h-adapter-for-swd-debugging/ OpenOCD with FT2232H] 1. Download and install [https://cygwin.com/setup-x86.exe setup-x86.exe (32-bit system)] 2. 选择 Install from Internet, 在 "User URL" 处输入以下地址: https://mirrors.tuna.tsinghua.edu.cn/cygwin/ 点击 Add 按钮, 然后选中 https://mirrors.tuna.tsinghua.edu.cn, 点击”下一步”进行安装。 3. 选择如下软件包: <pre> autobuild autoconf autoconf-archive automake libtool make pkg-config git patchutils ################ mingw64-i686-binutils mingw64-i686-gcc-core mingw64-i686-pthreads mingw64-i686-runtime mingw64-i686-libusb 1.0 ################ </pre> 运行环境如果是 cygwin(不推荐) 则把如上相关包换成: <pre> gcc-core libusb1.0 libusb1.0-devel usbutils </pre> 4. git clone <source lang=bash> $ git clone git://git.code.sf.net/p/openocd/code openocd $ cd openocd $ mkdir build $ cd build $ ../configure --enable-ftdi --enable-stlink --disable-doxygen-html --disable-werror --disable-libtool-lock --build=i686-pc-cygwin --host=i686-w64-mingw32 $ make $ make install </source> 编译完后,找到 libgcc_s_sjlj-1.dll libusb-1.0.dll openocd.exe 置于: dist/bin/ 下,usr/local/share/openocd 放在 dist/share 下,打包 dist/ 即可 release 到其他机器运行 You can flash the bin file into the EFM32 via OpenOCD with STLINK V2: '''Pin:''' * PIN19 --- PF0 --- DBG_SWCLK -----> STLINK_V2-SWCLK * PIN20 --- PF1 --- DBG_SWDIO -----> STLINK_V2-SWDIO * PIN-7 --- RSTn --- RESET ---> STLINK_V2-Reset Windows: * http://gnutoolchains.com/arm-eabi/openocd/ Flashing the toboot with ST-Link: <source lang=bash> $ ../../toolchain/openocd/bin/openocd -f interface/stlink.cfg -c "set CPUTAPID 0x0bc11477; source [find target/efm32.cfg]; \ init; targets; reset halt; flash probe 0; flash write image erase eerpom.bin; verify reset; shutdown" Open On-Chip Debugger 0.10.0 (2019-10-24) [https://github.com/sysprogs/openocd] Licensed under GNU GPL v2 libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'. Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD Info : clock speed 1000 kHz Info : STLINK V2J27S6 (API v2) VID:PID 0483:3748 Info : Target voltage: 3.233400 Info : efm32.cpu: hardware has 4 breakpoints, 2 watchpoints Info : Listening on port 3333 for gdb connections target halted due to debug-request, current mode: Thread xPSR: 0x81000000 pc: 0x000005e8 msp: 0x20001000 Info : detected part: EFM32ZG Zero Gecko, rev 143 Info : flash size = 32kbytes Info : flash page size = 1024bytes efm32 flash flash bank bank_id driver_name base_address size_bytes chip_width_bytes bus_width_bytes target [driver_options ...] flash banks flash erase_address ['pad'] ['unlock'] address length flash erase_check bank_id flash erase_sector bank_id first_sector_num (last_sector_num|'last') flash fillb address value n flash fillh address value n flash fillw address value n flash info bank_id ['sectors'] flash init flash list flash padded_value bank_id value flash probe bank_id flash protect bank_id first_block [last_block|'last'] ('on'|'off') flash read_bank bank_id filename [offset [length]] flash verify_bank bank_id filename [offset] flash write_bank bank_id filename [offset] flash write_image [erase] [unlock] filename [offset [file_type]] gdb_flash_program ('enable'|'disable') </source> <br> '''J-Link:''' '''J-Link:''' [[文件:JLink Interface Pinout SWD.jpg]] 使用 5 根线: VTref, GND, SWIO, SWCLK, RESET <source lang=bash> $ ../../toolchain/openocd-nt/bin/openocd -f interface/jlink.cfg -c "transport select swd; set CPUTAPID 0x0bc11477; source [find target/efm32.cfg]; init; targets; reset halt; program build/main.bin verify reset; shutdown" Open On-Chip Debugger 0.10.0+dev-00957-g9de7d9c8 (2019-11-18-15:06) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : J-Link V9 compiled Dec 13 2019 11:14:50 Info : Hardware version: 9.30 Info : VTarget = 3.295 V Info : clock speed 1000 kHz Info : SWD DPIDR 0x0bc11477 Info : efm32.cpu: hardware has 4 breakpoints, 2 watchpoints Info : efm32.cpu: external reset detected Info : Listening on port 3333 for gdb connections target halted due to debug-request, current mode: Thread xPSR: 0x21000000 pc: 0x00000674 msp: 0x20001000 target halted due to debug-request, current mode: Thread xPSR: 0x21000000 pc: 0x00000674 msp: 0x20001000 ** Programming Started ** Info : detected part: EFM32ZG Zero Gecko, rev 143 Info : flash size = 32kbytes Info : flash page size = 1024bytes ** Programming Finished ** ** Verify Started ** ** Verified OK ** ** Resetting Target ** shutdown command invoked comca@AI-Workstation MINGW32 ~/work/nodetao/toolchain (master) $ ./openocd-nt/bin/openocd -f interface/jlink.cfg -c "transport select swd; set CPUTAPID 0x0bc11477; source [find target/efm32.cfg]; init; targets; reset halt; program ../sketch/aeco-hrx/fw/T2abc-v0613-nodbg.bin verify reset; shutdown" Open On-Chip Debugger 0.10.0+dev-00957-g9de7d9c8 (2019-11-18-15:06) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : J-Link V9 compiled Dec 13 2019 11:14:50 Info : Hardware version: 9.30 Info : VTarget = 3.291 V Info : clock speed 1000 kHz Info : SWD DPIDR 0x0bc11477 Info : efm32.cpu: hardware has 4 breakpoints, 2 watchpoints Info : efm32.cpu: external reset detected Info : Listening on port 3333 for gdb connections target halted due to debug-request, current mode: Thread xPSR: 0x21000000 pc: 0x00000e84 msp: 0x20001000 target halted due to debug-request, current mode: Thread xPSR: 0x21000000 pc: 0x00000e84 msp: 0x20001000 ** Programming Started ** Info : detected part: EFM32ZG Zero Gecko, rev 143 Info : flash size = 32kbytes Info : flash page size = 1024bytes ** Programming Finished ** ** Verify Started ** ** Verified OK ** ** Resetting Target ** shutdown command invoked </source> <br>
返回到
EFM32
。
个人工具
登录
名字空间
页面
讨论
变换
查看
阅读
查看源代码
查看历史
操作
搜索
导航
首页
社区专页
新闻动态
最近更改
随机页面
帮助
工具箱
链入页面
相关更改
特殊页面