[hemmerling] AVR Microcontrollers Expertness 1/4 - Typcial Error Messages of the Atmel AVR Toolchain

1 "New Hardware Found"

  • Issue: Each time when booting of a host PC with ( german ) Vista operating system and “Atmel AVR XMEGA-A3BU Xplained kit” and the hardware debugger JTAGICE 3 attached, there is the ( german ) message “Neue Hardware gefunden”, and two new devices are named ( in german language ) in the Windows device manager “Basiseingabegerät” and “Netzwerkcontroller”, though all necessary drivers are properly installed.
  • Suggestion: Deinstall the two new devices from the Windows device manager, after each booting of Vista.

2 "No Source Available"

  • Issue: With Atmel Studio 5, when debugging with JTAGICE3, after the the debugger start, there is a window in Atmel Studio 5 with the message “No Source Available. There is no source code for the current location”.
  • Advice: Ignore the message, switch back to your source file and continue debugging.
  • Guilty: The compiler optimization.
  • Solution to avoid the message: Atmel Studio 5, “Project / Properties / Toolchain / AVR/GNU C Compiler / Optimization” - Set the “Optimization Level” to “None (-O0)”.

3 "The breakpoint will currently not be hit. Unable to set the requested breakpoint on target"

  • Issue: When debugging a program with Atmel Studio 5, some breakpoints are irgnored, by the cloud message “The breakpoint will currently not be hit. Unable to set the requested breakpoint on target. Note: The currently selected device is unable to set breakpoints during runtime”. Before the debugging starts, all set breakpoints cause a red filled bullet to appear at the beginning of the editor line. This visualisation changes during debugging: Irgnored breakpoints are visualized by a yellow non-filled bullet.
  • Guilty: The compiler optimization.
  • Solution to avoid the message: Atmel Studio 5, “Project / Properties / Toolchain / AVR/GNU C Compiler / Optimization” - Set the “Optimization Level” to “None (-O0)” and disable all other compiler and linker optons too.

4 "R_AVR_13_PCREL against symbol `__mulsf3'"

  • Issue: Linker error.
    Invoking:AVR/GNU C/C++ Linker.
    /home/tools/hudson/workspace/avr8-gnu-toolchain/src/avr-libc/libm/fplib/fp_powsodd.S(59,1): R_AVR_13_PCREL against symbol `__mulsf3' defined in .text section in c:/program files/atmel/avr studio 5.0/avr toolchain/bin/../lib/gcc/avr/4.5.1/avrxmega6\libgcc.a(_mul_sf.o)
    /home/tools/hudson/workspace/avr8-gnu-toolchain/src/avr-libc/libm/fplib/fp_powsodd.S(69,1): R_AVR_13_PCREL against symbol `__mulsf3' defined in .text section in c:/program files/atmel/avr studio 5.0/avr toolchain/bin/../lib/gcc/avr/4.5.1/avrxmega6\libgcc.a(_mul_sf.o)
  • Solution: Atmel Studio 5, “Project / Properties / Toolchain / AVR/GNU C Linker / Libraries”, Button “Add Libraries (-Wl, -l )” - Enter “m” ( for the library “libm.a” ).

5 Arduino IDE "stk500v2_command(): unknown status 0xc8"

  • Issue: Arduino IDE 1.0, error message during upload of the “File / Examples / 1Basics / Blink” program by USB without programmer: “stk500v2_command(): unknown status 0xc8”.
  • Solution:
    1. Plug in the Ardunio, e.g. the Arduino Mega ADK.
    2. Right-click on 'My Computer' and select properties.
    3. Select “Device Manager”.
    4. Scroll down to ports to “Ports ( COM & LPT )”.
    5. Find the port the Arduino is connected on ( e.g. “Aurduino Mega ADK ( COM23” ).
    6. With the Arduino IDE, select the right serial port or virtual serial port , at “Tools / Serial Port”. Be shure to set the proper serial port for the Arduino IDE at “Tools / Serial Port”, each time you plugin the Arduino!
  • Default port settings: 9600 bps, 8 data bits, parity: none, 1 stop bit, flow control: none.
  • How to reinstall the serial driver on Windows:
    1. Download the Arduino IDE and unpackage it, e.g. at “C:\Program Files\Arduino”.
    2. Plug in the Ardunio, e.g. the Arduino Mega ADK.
    3. Right-click on 'My Computer' and select properties.
    4. Select “Device Manager”.
    5. Scroll down to ports.
    6. Find the port the Arduino is connected on and right-click and select properties.
    7. Select “Update driver”.
    8. Select “Browse my computer for driver software”.
    9. Browse to the folder where you unpackaged Arduino IDE and select the driver folder. In case of Vista and Win7, this task might be done by the operating system.
    10. Press Next

6 Arduino IDE - Some general Tips

  • Issue:
    • Though the Arduinio IDE allows to divide a project into several “sketches” ( i.e. files ), it just compiles all sketches in a single compiler run. This may increase compilation times, with huge projects.
  • Issue:
    • It was reported that this single compilation of all project sketches might cause easily unexpected compiler errors due to muliple inclusion of include files.
  • Information:
    • Though the Arduino softare framework amd its documentation is intended to look and fee like the Wiring Platform and its crippled programming language ( see Atmel ATmega, ATtiny, AT90 & ATmega on the Arduino / Freeduino Platform, section “The Wireing Platform” ), the genuine Atmel C/C++ is used for compilation. So you can use many true C/C++ features ( and C/C++ “tricks” ) with the Arduino software framework.

6 Interpretation of Fritzing Displays of Breadboards - Some general Tips

  • Information:
    • If you buy a Fritzing kit, you get a “double breadboard”, while the FritzIng videos & Fritzing graphics display just show a “single breadboard”. In the middle of the “double breadboard”, at the position labled “W”, there is no connection between the outer 2 lines of interface jacks, both at the upper and lower side of the board. You need to wire connections there, to get power and ground signals available on the other half of the board :-).

Appropriate OpenDirectory Directory Pages

 
en/avr01.html.txt · Last modified: 2017/08/22 23:13 (external edit) · []
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki