Hi Raman, Thank you very much for this detailed update! I'm really impressed by your hard work to get it working. I think AVR32 itself is very challenging now on Linux because Atmel original code is rusting (unfortunately not in the Rust way hehehe).
So or later this old tools will stop to work on Linux because as you noticed many things changed, like the gksudo that doesn't exist anymore. This is why I don't like to use proprietary solutions because when it becomes abandware software it is hard to maintain. Unfortunately in this case OpenOCD also is not helping, because the AVR32 support it very limited (AFAIK there is no support to flash AVR32 chips) and because I don't have the original Atmel JTAGICE MkII I cannot use their avr32program as well. I didn't find yet the atprogram that you suggested, but I found a nice tutorial here: https://blog.mbedded.ninja/programming/microcontrollers/atmel/atmel-at32-family/re-programming-andor-modifying-the-dfu-bootloader/ If I don't get it working I will try my last two options: using my versaloon programmer with vsprog (it seems to support avr32 programming, it is a shame that versaloon project died), alternatively I will try to use avrdude with USBasp to program the chip using ISP (it seems avrdude supports AT32UC3B, but I couldn't find much info) Best Regards, Alan On 11/24/23, Raman Gopalan <ramangopa...@gmail.com> wrote: > Dear Alan, Greetings! > > I re-installed my GNU/Linux. I am running Ubuntu 23.10. Atleast, > things are working as expected. All my problems with /dev are > solved. My Atmel ICE device is getting enumerated fine. Here is my > version. > > raman@foo:~$ lsb_release -a > No LSB modules are available. > Distributor ID: Ubuntu > Description: Ubuntu 23.10 > Release: 23.10 > Codename: mantic > > Second: I had a little luck with OpenOCD and Atmel ICE for the avr32 > target. The following invocation gives me the following response. > > raman@foo:~$ sudo openocd -d3 -f interface/cmsis-dap.cfg -c "transport > select jtag" -c "adapter speed 1000" -f target/avr32.cfg > Open On-Chip Debugger 0.12.0 > Licensed under GNU GPL v2 > For bug reports, read > http://openocd.org/doc/doxygen/bugs.html > User : 3 2 options.c:52 configuration_output_handler(): debug_level: 3 > User : 4 2 options.c:52 configuration_output_handler(): > Debug: 5 2 options.c:233 add_default_dirs(): bindir=/usr/bin > Debug: 6 2 options.c:234 add_default_dirs(): pkgdatadir=/usr/share/openocd > Debug: 7 2 options.c:235 add_default_dirs(): exepath=/usr/bin > Debug: 8 2 options.c:236 add_default_dirs(): bin2data=../share/openocd > Debug: 9 2 configuration.c:33 add_script_search_dir(): adding > /root/.config/openocd > Debug: 10 2 configuration.c:33 add_script_search_dir(): adding > /root/.openocd > Debug: 11 2 configuration.c:33 add_script_search_dir(): adding > /usr/bin/../share/openocd/site > Debug: 12 2 configuration.c:33 add_script_search_dir(): adding > /usr/bin/../share/openocd/scripts > Debug: 13 2 command.c:155 script_debug(): command - ocd_find > interface/cmsis-dap.cfg > Debug: 14 2 configuration.c:88 find_file(): found > /usr/bin/../share/openocd/scripts/interface/cmsis-dap.cfg > Debug: 15 2 command.c:155 script_debug(): command - adapter driver > cmsis-dap > Debug: 16 2 command.c:155 script_debug(): command - transport select jtag > User : 17 2 options.c:52 configuration_output_handler(): jtagUser : 18 2 > options.c:52 configuration_output_handler(): > Debug: 19 2 command.c:155 script_debug(): command - adapter speed 1000 > Debug: 20 2 adapter.c:251 adapter_config_khz(): handle adapter khz > Debug: 21 2 adapter.c:215 adapter_khz_to_speed(): convert khz to adapter > specific speed value > Debug: 22 2 adapter.c:215 adapter_khz_to_speed(): convert khz to adapter > specific speed value > User : 23 2 options.c:52 configuration_output_handler(): adapter speed: > 1000 kHz > User : 24 2 options.c:52 configuration_output_handler(): > Debug: 25 2 command.c:155 script_debug(): command - ocd_find > target/avr32.cfg > Debug: 26 2 configuration.c:88 find_file(): found > /usr/bin/../share/openocd/scripts/target/avr32.cfg > Debug: 27 2 command.c:155 script_debug(): command - adapter srst delay 100 > Debug: 28 2 command.c:155 script_debug(): command - jtag_ntrst_delay 100 > Debug: 29 2 command.c:155 script_debug(): command - reset_config > trst_and_srst separate > Debug: 30 2 command.c:155 script_debug(): command - jtag newtap avr32 cpu > -irlen 5 -ircapture 0x1 -irmask 0x1 -expected-id 0x21e8203f > Debug: 31 2 tcl.c:557 jim_newtap_cmd(): Creating New Tap, Chip: avr32, Tap: > cpu, Dotted: avr32.cpu, 8 params > Debug: 32 2 tcl.c:582 jim_newtap_cmd(): Processing option: -irlen > Debug: 33 2 tcl.c:582 jim_newtap_cmd(): Processing option: -ircapture > Debug: 34 2 tcl.c:582 jim_newtap_cmd(): Processing option: -irmask > Warn : 35 2 tcl.c:490 jim_newtap_ir_param(): avr32.cpu: nonstandard IR mask > Debug: 36 2 tcl.c:582 jim_newtap_cmd(): Processing option: -expected-id > Debug: 37 2 core.c:1474 jtag_tap_init(): Created Tap: avr32.cpu @ abs > position 0, irlen 5, capture: 0x1 mask: 0x1 > Debug: 38 2 command.c:155 script_debug(): command - target create avr32.cpu > avr32_ap7k -endian big -chain-position avr32.cpu > Debug: 39 2 target.c:2199 target_free_all_working_areas_restore(): freeing > all working areas > User : 40 2 options.c:52 configuration_output_handler(): avr32.cpuUser : 41 > 2 options.c:52 configuration_output_handler(): > Info : 42 2 server.c:297 add_service(): Listening on port 6666 for tcl > connections > Info : 43 2 server.c:297 add_service(): Listening on port 4444 for telnet > connections > Debug: 44 2 command.c:155 script_debug(): command - init > Debug: 45 2 command.c:155 script_debug(): command - target init > Debug: 46 2 command.c:155 script_debug(): command - target names > Debug: 47 2 command.c:155 script_debug(): command - avr32.cpu cget -event > gdb-flash-erase-start > Debug: 48 2 command.c:155 script_debug(): command - avr32.cpu configure > -event gdb-flash-erase-start reset init > Debug: 49 2 command.c:155 script_debug(): command - avr32.cpu cget -event > gdb-flash-write-end > Debug: 50 2 command.c:155 script_debug(): command - avr32.cpu configure > -event gdb-flash-write-end reset halt > Debug: 51 2 command.c:155 script_debug(): command - avr32.cpu cget -event > gdb-attach > Debug: 52 2 command.c:155 script_debug(): command - avr32.cpu configure > -event gdb-attach halt 1000 > Debug: 53 2 target.c:1657 handle_target_init_command(): Initializing > targets... > Debug: 54 2915 cmsis_dap_usb_bulk.c:170 cmsis_dap_usb_open(): enumerating > interfaces of 0x1d6b:0x0003 > Debug: 55 3091 cmsis_dap_usb_bulk.c:170 cmsis_dap_usb_open(): enumerating > interfaces of 0x1d6b:0x0002 > Debug: 56 3226 cmsis_dap_usb_bulk.c:170 cmsis_dap_usb_open(): enumerating > interfaces of 0x0bda:0x0411 > Debug: 57 3307 cmsis_dap_usb_bulk.c:170 cmsis_dap_usb_open(): enumerating > interfaces of 0x1d6b:0x0003 > Debug: 58 3426 cmsis_dap_usb_bulk.c:170 cmsis_dap_usb_open(): enumerating > interfaces of 0x0408:0x5371 > Debug: 59 3540 cmsis_dap_usb_bulk.c:170 cmsis_dap_usb_open(): enumerating > interfaces of 0x8087:0x0a2b > Debug: 60 4542 cmsis_dap_usb_bulk.c:126 cmsis_dap_usb_open(): could not > read serial number for device 0x03eb:0x2ff6: Operation timed out > Warn : 61 5545 cmsis_dap_usb_bulk.c:147 cmsis_dap_usb_open(): could not > read product string for device 0x03eb:0x2ff6: Operation timed out > Debug: 62 5545 cmsis_dap_usb_bulk.c:170 cmsis_dap_usb_open(): enumerating > interfaces of 0x03eb:0x2ff6 > Debug: 63 5546 cmsis_dap_usb_bulk.c:150 cmsis_dap_usb_open(): found product > string of 0x03eb:0x2141 'Atmel-ICE CMSIS-DAP' > Debug: 64 5546 cmsis_dap_usb_bulk.c:170 cmsis_dap_usb_open(): enumerating > interfaces of 0x03eb:0x2141 > Debug: 65 5547 cmsis_dap_usb_bulk.c:217 cmsis_dap_usb_open(): found > interface 0 string 'Atmel-ICE CMSIS-DAP' > Debug: 66 5547 cmsis_dap_usb_bulk.c:237 cmsis_dap_usb_open(): skipping > interface 0, endpoint[0] is not bulk out > Debug: 67 5547 cmsis_dap_usb_bulk.c:237 cmsis_dap_usb_open(): skipping > interface 1, endpoint[0] is not bulk out > Debug: 68 5551 cmsis_dap_usb_bulk.c:170 cmsis_dap_usb_open(): enumerating > interfaces of 0x0bda:0x5411 > Debug: 69 5553 cmsis_dap_usb_bulk.c:170 cmsis_dap_usb_open(): enumerating > interfaces of 0x046d:0xc542 > Debug: 70 5553 cmsis_dap_usb_bulk.c:170 cmsis_dap_usb_open(): enumerating > interfaces of 0x1d6b:0x0002 > Info : 71 5634 cmsis_dap.c:1027 cmsis_dap_get_caps_info(): CMSIS-DAP: SWD > supported > Info : 72 5634 cmsis_dap.c:1027 cmsis_dap_get_caps_info(): CMSIS-DAP: JTAG > supported > Info : 73 5635 cmsis_dap.c:1004 cmsis_dap_get_version_info(): CMSIS-DAP: FW > Version = 1.0 > Info : 74 5636 cmsis_dap.c:989 cmsis_dap_get_serial_info(): CMSIS-DAP: > Serial# = J42700053627 > Info : 75 5637 cmsis_dap.c:1197 cmsis_dap_init(): CMSIS-DAP: Interface > Initialised (JTAG) > Debug: 76 5638 cmsis_dap.c:1238 cmsis_dap_init(): CMSIS-DAP: Packet Count = > 4 > Debug: 77 5638 cmsis_dap.c:1241 cmsis_dap_init(): Allocating FIFO for 3 > pending packets > Info : 78 5641 cmsis_dap.c:1060 cmsis_dap_get_status(): SWCLK/TCK = 1 > SWDIO/TMS = 1 TDI = 1 TDO = 1 nTRST = 0 nRESET = 1 > Info : 79 5644 cmsis_dap.c:1292 cmsis_dap_init(): CMSIS-DAP: Interface > ready > Debug: 80 5644 adapter.c:215 adapter_khz_to_speed(): convert khz to adapter > specific speed value > Debug: 81 5644 adapter.c:219 adapter_khz_to_speed(): have adapter set up > Debug: 82 5645 adapter.c:215 adapter_khz_to_speed(): convert khz to adapter > specific speed value > Debug: 83 5645 adapter.c:219 adapter_khz_to_speed(): have adapter set up > Info : 84 5645 adapter.c:179 adapter_init(): clock speed 1000 kHz > Debug: 85 5645 openocd.c:134 handle_init_command(): Debug Adapter init > complete > Debug: 86 5645 command.c:155 script_debug(): command - transport init > Debug: 87 5645 log.c:412 gdb_timeout_warning(): keep_alive() was not > invoked in the 1000 ms timelimit (5645 ms). This may cause trouble with GDB > connections. > Debug: 88 5645 transport.c:219 handle_transport_init(): > handle_transport_init > Debug: 89 5646 core.c:830 jtag_add_reset(): SRST line released > Debug: 90 5646 core.c:855 jtag_add_reset(): TRST line released > Debug: 91 5646 core.c:328 jtag_call_event_callbacks(): jtag event: TAP > reset > Debug: 92 5851 command.c:155 script_debug(): command - jtag arp_init > Debug: 93 5851 core.c:1509 jtag_init_inner(): Init JTAG chain > Debug: 94 5851 core.c:328 jtag_call_event_callbacks(): jtag event: TAP > reset > Info : 95 5851 cmsis_dap.c:1349 cmsis_dap_execute_tlr_reset(): cmsis-dap > JTAG TLR_RESET > Debug: 96 5852 core.c:1234 jtag_examine_chain(): DR scan interrogation for > IDCODE/BYPASS > Debug: 97 5852 core.c:328 jtag_call_event_callbacks(): jtag event: TAP > reset > Info : 98 5855 cmsis_dap.c:1349 cmsis_dap_execute_tlr_reset(): cmsis-dap > JTAG TLR_RESET > Info : 99 5856 core.c:1133 jtag_examine_chain_display(): JTAG tap: > avr32.cpu tap/device found: 0x81ee403f (mfg: 0x01f (Atmel), part: 0x1ee4, > ver: 0x8) > Warn : 100 5856 core.c:1133 jtag_examine_chain_display(): JTAG tap: > avr32.cpu UNEXPECTED: 0x81ee403f (mfg: 0x01f (Atmel), part: 0x1ee4, > ver: 0x8) > Error: 101 5856 core.c:1133 jtag_examine_chain_display(): JTAG tap: > avr32.cpu expected 1 of 1: 0x21e8203f (mfg: 0x01f (Atmel), part: 0x1e82, > ver: 0x2) > Error: 102 5856 core.c:1554 jtag_init_inner(): Trying to use configured > scan chain anyway... > Debug: 103 5856 core.c:1364 jtag_validate_ircapture(): IR capture > validation scan > Debug: 104 5857 core.c:1421 jtag_validate_ircapture(): avr32.cpu: IR > capture 0x01 > Warn : 105 5857 core.c:1577 jtag_init_inner(): Bypassing JTAG setup events > due to errors > Debug: 106 5857 command.c:155 script_debug(): command - dap init > Debug: 107 5857 arm_dap.c:97 dap_init_all(): Initializing all DAPs ... > Debug: 108 5857 openocd.c:151 handle_init_command(): Examining targets... > Debug: 109 5857 target.c:1843 target_call_event_callbacks(): target event > 19 (examine-start) for core avr32.cpu > Info : 110 5860 avr32_ap7k.c:532 avr32_ap7k_examine(): device id: 81ee403f > Info : 111 5866 avr32_ap7k.c:538 avr32_ap7k_examine(): target is halted > Debug: 112 5866 target.c:1843 target_call_event_callbacks(): target event > 21 (examine-end) for core avr32.cpu > Debug: 113 5866 command.c:155 script_debug(): command - flash init > Debug: 114 5866 tcl.c:1375 handle_flash_init_command(): Initializing flash > devices... > Debug: 115 5866 command.c:155 script_debug(): command - nand init > Debug: 116 5866 tcl.c:487 handle_nand_init_command(): Initializing NAND > devices... > Debug: 117 5866 command.c:155 script_debug(): command - pld init > Debug: 118 5866 pld.c:194 handle_pld_init_command(): Initializing PLDs... > Debug: 119 5866 command.c:155 script_debug(): command - tpiu init > Info : 120 5866 gdb_server.c:3791 gdb_target_start(): starting gdb server > for avr32.cpu on 3333 > Info : 121 5866 server.c:297 add_service(): Listening on port 3333 for gdb > connections > > __ > > And now, I invoked gdb-multiarch from another terminal session and I > received this: > > Info : 122 44457 server.c:90 add_connection(): accepting 'gdb' connection > on tcp/3333 > Debug: 123 44457 breakpoints.c:362 breakpoint_clear_target_internal(): > Delete all breakpoints for target: avr32.cpu > Debug: 124 44457 breakpoints.c:542 watchpoint_clear_target(): Delete all > watchpoints for target: avr32.cpu > Debug: 125 44457 target.c:1843 target_call_event_callbacks(): target event > 22 (gdb-attach) for core avr32.cpu > Debug: 126 44457 target.c:5099 target_handle_event(): target(0): avr32.cpu > (avr32_ap7k) event: 22 (gdb-attach) action: halt 1000 > Debug: 127 44457 command.c:155 script_debug(): command - halt 1000 > Debug: 128 44459 target.c:3305 handle_halt_command(): - > Debug: 129 44459 avr32_ap7k.c:260 avr32_ap7k_halt(): target->state: halted > Debug: 130 44459 avr32_ap7k.c:264 avr32_ap7k_halt(): target was already > halted > Debug: 131 44461 gdb_server.c:1070 gdb_new_connection(): New GDB > Connection: 1, Target avr32.cpu, state: halted > Debug: 132 44461 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: > qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+;memory-tagging+;xmlRegisters=i386 > Error: 133 44461 avr32_ap7k.c:577 avr32_ap7k_get_gdb_reg_list(): > avr32_ap7k_get_gdb_reg_list: implement me > Error: 134 44461 gdb_server.c:2612 gdb_target_description_supported(): get > register list failed > Info : 135 44461 gdb_server.c:2870 gdb_query_packet(): Failed detecting > Target Description Support, disabling > Debug: 136 44461 gdb_server.c:406 gdb_log_outgoing_packet(): [avr32.cpu] > sending packet: $E01#a6 > Debug: 137 44461 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: + > Debug: 138 44462 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: vCont? > Debug: 139 44462 gdb_server.c:406 gdb_log_outgoing_packet(): [avr32.cpu] > sending packet: $vCont;c;C;s;S#62 > Debug: 140 44462 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: + > Debug: 141 44462 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: vMustReplyEmpty > Debug: 142 44462 gdb_server.c:406 gdb_log_outgoing_packet(): [avr32.cpu] > sending packet: $#00 > Debug: 143 44462 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: + > Debug: 144 44463 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: ! > Debug: 145 44463 gdb_server.c:406 gdb_log_outgoing_packet(): [avr32.cpu] > sending packet: $OK#9a > Debug: 146 44463 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: + > Debug: 147 44463 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: Hg0 > Debug: 148 44463 gdb_server.c:406 gdb_log_outgoing_packet(): [avr32.cpu] > sending packet: $OK#9a > Debug: 149 44463 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: + > Debug: 150 44463 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: qTStatus > Debug: 151 44464 gdb_server.c:406 gdb_log_outgoing_packet(): [avr32.cpu] > sending packet: $#00 > Debug: 152 44464 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: + > Debug: 153 44464 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: ? > User : 154 44464 gdb_server.c:162 gdb_last_signal(): undefined debug reason > 8 - target needs reset > Debug: 155 44464 gdb_server.c:406 gdb_log_outgoing_packet(): [avr32.cpu] > sending packet: $S00#b3 > Debug: 156 44464 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: + > Debug: 157 44464 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: qfThreadInfo > Debug: 158 44464 gdb_server.c:406 gdb_log_outgoing_packet(): [avr32.cpu] > sending packet: $l#6c > Debug: 159 44465 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: + > Debug: 160 44465 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: Hc-1 > Debug: 161 44465 gdb_server.c:406 gdb_log_outgoing_packet(): [avr32.cpu] > sending packet: $OK#9a > Debug: 162 44465 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: + > Debug: 163 44465 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: qC > Debug: 164 44465 gdb_server.c:406 gdb_log_outgoing_packet(): [avr32.cpu] > sending packet: $QC0#c4 > Debug: 165 44465 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: + > Debug: 166 44465 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: qAttached > Debug: 167 44465 gdb_server.c:406 gdb_log_outgoing_packet(): [avr32.cpu] > sending packet: $1#31 > Debug: 168 44465 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: + > Debug: 169 44466 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: qOffsets > Debug: 170 44466 gdb_server.c:406 gdb_log_outgoing_packet(): [avr32.cpu] > sending packet: $Text=0;Data=0;Bss=0#04 > Debug: 171 44466 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: + > Debug: 172 44466 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: g > Error: 173 44466 avr32_ap7k.c:577 avr32_ap7k_get_gdb_reg_list(): > avr32_ap7k_get_gdb_reg_list: implement me > Debug: 174 44466 gdb_server.c:1483 gdb_error(): Reporting -4 to GDB as > generic error > Debug: 175 44466 gdb_server.c:406 gdb_log_outgoing_packet(): [avr32.cpu] > sending packet: $E0E#ba > Debug: 176 44466 gdb_server.c:390 gdb_log_incoming_packet(): [avr32.cpu] > received packet: + > Debug: 177 44467 gdb_server.c:228 gdb_get_char_inner(): GDB connection > closed by the remote client > Debug: 178 44467 gdb_server.c:1112 gdb_connection_closed(): GDB Close, > Target: avr32.cpu, state: halted, gdb_actual_connections=0 > Debug: 179 44467 target.c:1843 target_call_event_callbacks(): target event > 8 (gdb-end) for core avr32.cpu > Debug: 180 44467 target.c:1843 target_call_event_callbacks(): target event > 23 (gdb-detach) for core avr32.cpu > Info : 181 44467 server.c:574 server_loop(): dropped 'gdb' connection > >> Error: 173 44466 avr32_ap7k.c:577 avr32_ap7k_get_gdb_reg_list(): >> avr32_ap7k_get_gdb_reg_list: implement me > > From this part of the log above, I checked the source code [1] of > openocd to see why this might be happening. It turns out that the > function is in fact commented out. I am not sure what happens if I > rebuild openocd with the currently commented implementation. I have yet > to check this. > > Second: I tried a few additional things in the context of NuttX and > GNU/Linux. I tried installing the older avr32studio that lives under > archive on Microchip's website. > > It took me a few hours to resolve all the Java problems (avr32studio > is constructed around Eclipse). I finally had luck with avr32studio on > GNU/Linux after I installed Oracle's Java 6.0. > > But the installer/tools on GUI expects gksudo on GNU/Linux which no > longer exists. This step would have setup udev for the programming > tools. It supports Dragon, AVR One! and the Atmel mkII JTAG > programmer. Unfortunately, I can't get the USB tools required with > avr32studio for a debug session. No support for Atmel ICE :) > > Third: I also tried getting the latest version of Wine for Ubuntu to > see if I can get the Microchip Studio 7.0 installer (also the latest) > working. It fails without any echo. I also tried wine-tricks. They > didn't help much. I did a lot of reading on wine-tricks. It was very > interesting. But it didn't help. > > I am slowly starting to consider brute-force. Every other direction > pulls me into hours of additional work that takes me all the more away > from NuttX. I really think - and for quicker answers - and although > very painful, I will try to manually make a NuttX project for > Microchip Studio by looking up the Make logs on GNU/Linux. Atleast > debugging works perfectly with Microchip Studio. > > Alan, did you have any luck at your end after our previous > discussions? Finally, I still haven't had a chance to see the UART > problem with my logic analyser. I will reserve my entire Sunday for > this activity. > > R > > References: > [1]: https://openocd.org/doc-release/doxygen/avr32__ap7k_8c_source.html > > On Tue, 21 Nov 2023 at 21:21, Raman Gopalan <ramangopa...@gmail.com> wrote: > >> >> Dear Alan, Greetings! >> >> About the CMake files: Despite installing Kconfiglib (for Python3) I get >> errors >> like these: >> >> raman@foo:~/Skullets/nuttxspace/nuttx$ cmake -B build >> -DBOARD_CONFIG=avr32dev1:nsh -GNinja >> CMake Error at CMakeLists.txt:82 (message): >> Kconfig environment depends on kconfiglib, Please install: >> >> $ pip install kconfiglib >> >> >> -- Configuring incomplete, errors occurred! >> >> I wish not to raise a PR for something I have not tested. I am just >> pasting the >> files here for now. >> >> raman@foo:~/Skullets/nuttxspace/nuttx$ cat >> boards/avr/at32uc3/avr32dev1/src/CMakeLists.txt >> >> set(SRCS avr32_boot.c avr32_bringup.c) >> >> if(CONFIG_BOARDCTL) >> list(APPEND SRCS avr32_appinit.c) >> endif() >> >> if(CONFIG_ARCH_BUTTONS) >> list(APPEND SRCS avr32_buttons.c) >> endif() >> >> if(CONFIG_ARCH_LEDS) >> list(APPEND SRCS avr32_leds.c) >> endif() >> >> target_sources(board PRIVATE ${SRCS}) >> >> set_property(GLOBAL PROPERTY LD_SCRIPT >> "${NUTTX_BOARD_DIR}/scripts/avr32dev1.ld") >> >> -- >> >> raman@foo:~/Skullets/nuttxspace/nuttx$ cat >> boards/avr/at32uc3/avr32dev1/CMakeLists.txt >> >> add_subdirectory(src) >> >> -- >> >> Sorry Alan. I will try to reboot my machine with an updated Ubuntu >> GNU/Linux >> and redo all tests with cmake, openocd and dfu-programmer. >> >> Highest regards, >> >> R >> >> On Mon, 20 Nov 2023 at 20:57, Raman Gopalan <ramangopa...@gmail.com> >> wrote: >> >>> >>> Dear Alan, >>> >>> > But again, I think we can avoid this tortuous path and fix the CMake >>> > or >>> > Makefile to build on Windows. >>> >>> Fully understand. >>> >>> > BTW, could you please submit a PR with yours CMakefiles to AVR32? I >>> want to >>> > test it here too. >>> >>> For sure. May I send them to you tomorrow? I wrote them on Windows. An >>> invocation of cmake complained with errors on Windows like I mentioned. >>> I >>> will >>> test the CMake files with GNU/Linux before I send them to you tomorrow. >>> >>> R >>> >>> On Mon, 20 Nov 2023 at 18:39, Alan C. Assis <acas...@gmail.com> wrote: >>> >>>> Hi Raman, >>>> >>>> On 11/20/23, Raman Gopalan <ramangopa...@gmail.com> wrote: >>>> > Dear Alan, Greetings! >>>> > >>>> > Many thanks for your suggestions. >>>> > >>>> >> Note that I already adapted it to use your Atmel ICE Device S/N. I >>>> just >>>> > use: $ >>>> >> sudo openocd -f openocd.cfg >>>> > >>>> > Thank you Alan. I just pasted your openocd configuration and invoked >>>> > openocd >>>> > just like you suggested. Unfortunately, I still see the same problem >>>> > I >>>> had >>>> > yesterday. Here is the output: >>>> > >>>> > raman@foo:~/Skullets$ sudo openocd -f openocd.cfg >>>> > Open On-Chip Debugger 0.12.0+dev-00342-g21f17260d (2023-09-28-16:32) >>>> > Licensed under GNU GPL v2 >>>> > For bug reports, read >>>> > http://openocd.org/doc/doxygen/bugs.html >>>> > DEPRECATED! use 'adapter driver' not 'interface' >>>> > DEPRECATED! use 'adapter serial' not 'cmsis_dap_serial' >>>> > Info : auto-selecting first available session transport "swd". To >>>> override >>>> > use 'transport select <transport>'. >>>> > DEPRECATED! use 'adapter srst delay' not 'adapter_nsrst_delay' >>>> > DEPRECATED! use 'adapter srst pulse_width' not >>>> 'adapter_nsrst_assert_width' >>>> > adapter srst pulse_width: 100 >>>> > Info : Listening on port 6666 for tcl connections >>>> > Info : Listening on port 4444 for telnet connections >>>> > Error: unable to find a matching CMSIS-DAP device >>>> > >>>> > raman@foo:~/Skullets$ >>>> > >>>> > But I also confirm that the Atmel ICE works fine with Microchip >>>> > Studio >>>> OR >>>> > `atprogram', the command line tool that comes with it. >>>> > >>>> > Do you see a similar "unable to find" error at your end? >>>> > >>>> >>>> No, here OpenOCD is able to find my device, see log (without any board >>>> connected to it) >>>> >>>> $ sudo openocd -f openocd.cfg >>>> Open On-Chip Debugger 0.11.0+dev-00062-g6405d35f3 (2023-08-28-15:47) >>>> Licensed under GNU GPL v2 >>>> For bug reports, read >>>> http://openocd.org/doc/doxygen/bugs.html >>>> DEPRECATED! use 'adapter driver' not 'interface' >>>> Info : auto-selecting first available session transport "swd". To >>>> override use 'transport select <transport>'. >>>> DEPRECATED! use 'adapter srst delay' not 'adapter_nsrst_delay' >>>> DEPRECATED! use 'adapter srst pulse_width' not >>>> 'adapter_nsrst_assert_width' >>>> adapter srst pulse_width: 100 >>>> >>>> Info : Listening on port 6666 for tcl connections >>>> Info : Listening on port 4444 for telnet connections >>>> Info : CMSIS-DAP: SWD Supported >>>> Info : CMSIS-DAP: JTAG Supported >>>> Info : CMSIS-DAP: FW Version = 01.27.0082 >>>> Info : CMSIS-DAP: Serial# = J41800093472 >>>> Info : CMSIS-DAP: Interface Initialised (SWD) >>>> Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 1 TDO = 1 nTRST = 0 nRESET = 1 >>>> Info : CMSIS-DAP: Interface ready >>>> Info : clock speed 400 kHz >>>> Error: Error connecting DP: cannot read IDR >>>> >>>> >> Ubuntu, like you are using. >>>> > >>>> > Perfect! Only I don't see what I'm getting wrong yet. >>>> > >>>> >> as said, Kevin Liu was able to integrate NuttX into Microchip Studio >>>> > about 4 >>>> >> years ago, but he compiled and exported NuttX as library, just like >>>> PX4 >>>> > and >>>> >> other projects are doing. >>>> > >>>> > That is so jolly good! Understand, Alan. >>>> > >>>> >> Raman, I think this hack approach it not easy to do with NuttX, >>>> because >>>> >> different from other RTOS NuttX is very *very* customizable, that >>>> means >>>> > you >>>> >> can fine tune each internal bolts and nuts of it using some existent >>>> >> CONFIG_something. So, besides selecting the right files, it also >>>> >> needs >>>> >> the >>>> >> right CONFIGs >>>> > >>>> > Understand. But is there a way to also get the config files onto >>>> Microchip >>>> > Studio? OR are these config files temporary (/tmp for example) and >>>> > not >>>> > physical >>>> > config files. Just a quick workflow I imagine: configure the NuttX >>>> build >>>> > for a >>>> > specific target (say, avr32dev1) like we typically do on Cygwin. >>>> > >>>> > The ./tools/configure.sh -c avr32dev:nsh doesn't fail. Perhaps >>>> > there's >>>> a >>>> > way to >>>> > employ a tool to recurse through the NuttX codebase and copy the C >>>> files >>>> > and >>>> > config files - assuming a default configuration? But if I have a >>>> > rough >>>> idea >>>> > of >>>> > the structure (and where to look for these file and their target >>>> > destination for >>>> > pickup), I can help whip up something quick and dirty as a proof of >>>> > concept. >>>> > >>>> >>>> At root of nuttx/ you will find a .config with all CONFIG_ selected. >>>> >>>> But again, I think we can avoid this tortuous path and fix the CMake >>>> or Makefile to build on Windows. >>>> >>>> BTW, could you please submit a PR with yours CMakefiles to AVR32? I >>>> want to test it here too. >>>> >>>> > I can also imagine this: I haven't tried this so far but I'm sure >>>> Microchip >>>> > Studio is powered by Visual Studio. Its project configuration is >>>> > listed >>>> > here >>>> > [1], for example. I was just exploring to evaluate/gauge if we can >>>> generate >>>> > the >>>> > cproj file at all. Just thoughts so far. >>>> > >>>> > In essence, I wanted to check with you if CMake/GNU Make do something >>>> with >>>> > the >>>> > build that might otherwise be tricky to achieve using just Microchip >>>> > Studio? >>>> > Especially, on the Windows environment? >>>> > >>>> > Edit: I just ran `make -n' within nuttxspace/nuttx after configuring >>>> the >>>> > build >>>> > for avr32dev1. Oh, it such a long recipe! :) I understand it can be >>>> tricky. >>>> > I haven't read the echo to its entirely. >>>> > >>>> >>>> You can run "make V=1" to see all files been compiled and flag >>>> parameters. >>>> >>>> >> Yes, you can git checkout an old version tag (i.e 7.x or 8.x) of >>>> >> nuttx >>>> >> and >>>> >> also the same version of apps. >>>> > >>>> > Understand. >>>> > >>>> >> Nice! Probably you will see something coming from serial. Also you >>>> >> can >>>> > enable >>>> >> the Debug to print the ABC... letter of each stage of the early boot >>>> > process. >>>> >> Similar to old days of LILO bootloader of Linux. >>>> > >>>> > Very nice. I will enable Debug to check this. >>>> > >>>> >>>> Best Regards, >>>> >>>> Alan >>>> >>> >