无法在 GNAT 2019 社区版的 microbit 上运行 Ada 滚动文本演示
Unable to get the Ada scrolling text demo working on the microbit on GNAT 2019 community edition
我正在尝试 运行 此处描述的演示:https://blog.adacore.com/ada-on-the-microbit
我仔细按照教程的说明进行操作。我确实安装了 2019 版软件而不是 2018 版。 GPS 似乎已安装并在我的 windows 7 机器上工作。该项目已构建,但 pyocd-flashtool 似乎无法识别我的 microbit。它将其报告为 "generic cortex_m" 并抛出异常。
这是输出:
gprbuild --target=arm-eabi -d -PC:\Domains\ada\microbit_scrolling_text_demo\microbit_example.gpr
C:\Domains\ada\microbit_scrolling_text_demo\src\main.adb -largs -Wl,-Map=map.txt
Compile
[Ada] main.adb
Bind
[gprbind] main.bexch
[Ada] main.ali
Link
[link] main.adb
[2019-09-21 18:40:29] process terminated successfully, elapsed time: 02.57s
Retrieving the load address.
arm-eabi-objdump C:\Domains\ada\microbit_scrolling_text_demo\obj\main -h
Load address is: 0x00000000
Creating the binary (flashable) image.
arm-eabi-objcopy -O binary C:\Domains\ada\microbit_scrolling_text_demo\obj\main C:\Domains\ada\microbit_scrolling_text_demo\obj\main.bin
Flashing image to board...
pyocd-flashtool -a 0x00000000 C:\Domains\ada\microbit_scrolling_text_demo\obj\main.bin
WARNING:root:Unsupported board found 9901
INFO:root:DAP SWD MODE initialised
INFO:root:ROM table #0 @ 0xf0000000 cidr=b105100d pidr=2007c4001
INFO:root:[0]<e00ff000: cidr=b105100d, pidr=4000bb471, class=1>
INFO:root:ROM table #1 @ 0xe00ff000 cidr=b105100d pidr=4000bb471
INFO:root:[0]<e000e000:SCS-M0+ cidr=b105e00d, pidr=4000bb008, class=14>
INFO:root:[1]<e0001000:DWT-M0+ cidr=b105e00d, pidr=4000bb00a, class=14>
INFO:root:[2]<e0002000:BPU cidr=b105e00d, pidr=4000bb00b, class=14>
INFO:root:[1]<f0002000: cidr=b105900d, pidr=4000bb9a3, class=9, devtype=13, devid=0>
INFO:root:CPU core is Cortex-M0
INFO:root:4 hardware breakpoints, 0 literal comparators
INFO:root:2 hardware watchpoints
Traceback (most recent call last):
File "C:\GNAT19\lib\runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\GNAT19\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\GNAT19\bin\pyocd-flashtool.exe\__main__.py", line 9, in <module>
File "C:\GNAT19\lib\site-packages\pyOCD\tools\flash_tool.py", line 214, in main fast_verify=args.fast_program)
File "C:\GNAT19\lib\site-packages\pyOCD\flash\flash.py", line 286, in flashBlock flash_start = self.getFlashInfo().rom_start
File "C:\GNAT19\lib\site-packages\pyOCD\flash\flash_cortex_m.py", line 44, in getFlashInfo raise Exception("Unsupported flash operation on generic cortex_m")
Exception: Unsupported flash operation on generic cortex_m
Could not flash the executable.
[workflow stopped]
有人知道哪里出了问题吗?
在 C:\GNAT19\lib\site-packages\pyOCD\board\mbed_board.py
(或您平台上的等效位置)中,添加此行即可。
"9901": BoardInfo( "Microbit", "nrf51", "l1_microbit.bin", ),
我正在尝试 运行 此处描述的演示:https://blog.adacore.com/ada-on-the-microbit
我仔细按照教程的说明进行操作。我确实安装了 2019 版软件而不是 2018 版。 GPS 似乎已安装并在我的 windows 7 机器上工作。该项目已构建,但 pyocd-flashtool 似乎无法识别我的 microbit。它将其报告为 "generic cortex_m" 并抛出异常。
这是输出:
gprbuild --target=arm-eabi -d -PC:\Domains\ada\microbit_scrolling_text_demo\microbit_example.gpr
C:\Domains\ada\microbit_scrolling_text_demo\src\main.adb -largs -Wl,-Map=map.txt
Compile
[Ada] main.adb
Bind
[gprbind] main.bexch
[Ada] main.ali
Link
[link] main.adb
[2019-09-21 18:40:29] process terminated successfully, elapsed time: 02.57s
Retrieving the load address.
arm-eabi-objdump C:\Domains\ada\microbit_scrolling_text_demo\obj\main -h
Load address is: 0x00000000
Creating the binary (flashable) image.
arm-eabi-objcopy -O binary C:\Domains\ada\microbit_scrolling_text_demo\obj\main C:\Domains\ada\microbit_scrolling_text_demo\obj\main.bin
Flashing image to board...
pyocd-flashtool -a 0x00000000 C:\Domains\ada\microbit_scrolling_text_demo\obj\main.bin
WARNING:root:Unsupported board found 9901
INFO:root:DAP SWD MODE initialised
INFO:root:ROM table #0 @ 0xf0000000 cidr=b105100d pidr=2007c4001
INFO:root:[0]<e00ff000: cidr=b105100d, pidr=4000bb471, class=1>
INFO:root:ROM table #1 @ 0xe00ff000 cidr=b105100d pidr=4000bb471
INFO:root:[0]<e000e000:SCS-M0+ cidr=b105e00d, pidr=4000bb008, class=14>
INFO:root:[1]<e0001000:DWT-M0+ cidr=b105e00d, pidr=4000bb00a, class=14>
INFO:root:[2]<e0002000:BPU cidr=b105e00d, pidr=4000bb00b, class=14>
INFO:root:[1]<f0002000: cidr=b105900d, pidr=4000bb9a3, class=9, devtype=13, devid=0>
INFO:root:CPU core is Cortex-M0
INFO:root:4 hardware breakpoints, 0 literal comparators
INFO:root:2 hardware watchpoints
Traceback (most recent call last):
File "C:\GNAT19\lib\runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\GNAT19\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\GNAT19\bin\pyocd-flashtool.exe\__main__.py", line 9, in <module>
File "C:\GNAT19\lib\site-packages\pyOCD\tools\flash_tool.py", line 214, in main fast_verify=args.fast_program)
File "C:\GNAT19\lib\site-packages\pyOCD\flash\flash.py", line 286, in flashBlock flash_start = self.getFlashInfo().rom_start
File "C:\GNAT19\lib\site-packages\pyOCD\flash\flash_cortex_m.py", line 44, in getFlashInfo raise Exception("Unsupported flash operation on generic cortex_m")
Exception: Unsupported flash operation on generic cortex_m
Could not flash the executable.
[workflow stopped]
有人知道哪里出了问题吗?
在 C:\GNAT19\lib\site-packages\pyOCD\board\mbed_board.py
(或您平台上的等效位置)中,添加此行即可。
"9901": BoardInfo( "Microbit", "nrf51", "l1_microbit.bin", ),