Jump to content

    

mosagepa

Участник
  • Content Count

    6
  • Joined

Community Reputation

0 Обычный

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. As of 1): You can always just link the RXD & TXD lines to one of those cheap USB to UART and so not hassle with the inconvenient (and probably voltage-incompatible and outdated for modern PC use) RS232 link... I guess you were already aware of that. As of 2:) - Regarding clones to the JTAG-ICEmkI, you can get your hands on "Evertool", which is an AVRISP/STK-500 programmer BUT also JTAG-ICE-protocol aware. This means you can access it with both AVRStudio from Atmel and AVaRice. Related to question 1), there is "Evertool-USB" out there which basically has the integrated USB-UART (with a FTDI chip but you're not obligued to choose that and can use e.g. CP2102 or CH340/1 to the same means), in all other respects it's just the original Evertool. Please note that Evertool combines the ISP programming part (akin to e.g. USB-ASP) and the JTAG interface, you if you don't need the former you can do with just the JTAG part of the design and this would be called "Evertool-light". - Link about all this follows (have to use the Wayback Machine): EverTool and other clones (Wayback Machine) As the corresponding files for download are not always available at the same date references in the Wayback Machine, for convenience I've attached the ZIP for the Evertool (SEE AT BOTTOM LINE OF THIS POST.) Also I've taken the means to grant you a ZipFile I created for myself, with all the relevant info included, HERE---> EverTool info, schemaics & soft - NOTE: just in case you (or anyone interested in this topic) are talking about the problem when trying to use AVaRICE and either the JTAG-ICE mkI or II within Ubuntu / Linux. If you don't use proper command form for AVaRICE then it tries to connect with serial and gives all kind of problems, if the device is properly detected e.g. at 'lsusb' and 'dmesg' command info, then for example for using the MKII the right command is: (example about debugging code on an ATMega32): avarice -2 --jtag usb -P atmega32 :4242 which yields: Defaulting JTAG bitrate to 250 kHz. JTAG config starting. Found a device: JTAGICEmkII Serial number: 09:00:00:00:6c:6c Reported JTAG device ID: 0x9502 Configured for device ID: 0x9502 atmega32 -- Matched with atmega32 JTAG config complete. Preparing the target device for On Chip Debugging. Waiting for connection on port 4242 and REMEMBER, previously it is required that you properly clock the part (the ATMega32) by OSC or CLK etc. Then the server is initiated and you can enter GDB, example session would be like this, in another shell window: avr-gdb ./asm01.elf GNU gdb (GDB) 7.10.1 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=x86_64-linux-gnu --target=avr". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./asm01.elf...done. (gdb) target remote localhost:4242 Remote debugging using localhost:4242 Remote debugging using localhost:4242 reset () at FEATHER.INC:5 5 rjmp startup ; RESET External Pin/ POR/ BOR/ (gdb) n startup () at asm01.S:17 17 eor r1, r1 (gdb) n 18 mov r26, r1 (gdb) n ETC ETC.... - If you need a refresher about the GDB use & commands, I would also recommend a quick read of this tutorial: Using AVR-GDB and AVaRICE Together If you need any further help or insight with this don't hesitate to ask me. Kind regards from Spain! evertool_light_rr.zip
  2. I'd recommend the following reference book: "Tcl and Tk for the absolute beginner" by Kurt Wall. Maybe a bit outdated but worth it for a quick look and refresh. Find it readily on any "provider" (PDFbooks I'd suggest). Tcl is found within many environment as a supporting system language tool, recently I've found the TCL capabilites in e.g. the Xilinx Vivado IDE tools to be rather good for customizing and automating, kind of like scripts to do the tasks in the IDE, synthesis, implementation, all that without even reaching the menus of the graphical IDE as normally you'd do.
  3. _ASM (normally you'd find it lowercase) delimits a region (bunch of lines) within your C code or such, in which you write code in the form known as "inline assembler". This means using the assembly instruction set of the underlying architecture, chip, microprocessor or microcontroller. The syntax used to do that, as well as the addressing modes and such details, will be found in the reference guide/s (if any) for the programming environment, the compiler, the (C) language reference, or a combination of those sources for the environment you're using. From a practical point of view, inline assembler helps optimizing sections of critical code, and in summary you are getting the "best of both worlds" when mixing C and assembly. Give it a try whenever you find an application or routine that would benefit from it. Better off, write a couple of assembly programs (meaning 100% in assembler) thus learning in the process the details of both ASM and the system tools involved (assembler, linker, library management, and these tools' interactions with each other). You'll never regret!
  4. I've found that the original (or some higher priced clones) ATMEL JTAG-ICE mkII is not worth the additional $$$ for some, besides it being practically impossible to found used even on 2nd hand famous sites (eBay, you name it...) But it's the best option so far, especially if you're planning to debug it on Linux environment with GDB and all that stuff (needs utility AVaRICE to be installed to do that properly, and this comes with its own quirks, not easy for newcomers but can bring you the full details if you need and can get access to a mkII). I got by mere luck a JTAG-ICE mkII myself from a French guy, he did not lower the price but I was so eager. I would recommend you try ATMET JTAG ICE-mkI which is easier to clone, since the firmware has been published in several websites, along which corresponding schematics. If you can get your hands on an ATMega16 or 16L which is the ideal uC to burn the ICE firmware Can provide details on these clones and help you find the relevant source websites, if you ask me. But it needs you first try to guess whether your target device is supported by the mkI or mkII real variant, then proceed to pursue the corresponding clone HW + firmware path. Must point out, that those units are not real true ICE like e.g. a Microchip MPLAB ICE 2000 or ICE 4000... which are meant to replace/ emulate by way of some socketed form one of their supported processors in order to gain full debugging trace breakpoints etc etc on your real production or pre-production board, and so accelerates the interaction between HW and SW design teams. That was the way to be competitive back the days, not really relevant for today's work with modern uC toolchain work I guess... but nice to have nonetheless if just to mess around in the lab.