windowsasa.blogg.se

Codevisionavr debugger
Codevisionavr debugger









codevisionavr debugger
  1. #Codevisionavr debugger manual#
  2. #Codevisionavr debugger full#
  3. #Codevisionavr debugger code#
  4. #Codevisionavr debugger windows#

#Codevisionavr debugger manual#

CodeVisionAVR V3.28 User Manual Revision 63/08.2016 Copyright © 1998-2016 Pavel Haiduc and HP InfoTech S.R.L.

codevisionavr debugger

So I thought, I better try to ask and find out what is going on, otherwise poking around in the debugger won't help me much in troubleshooting.

#Codevisionavr debugger full#

Now when I try the same, the result printed on the LCD is the same regardless of which element of the multidimensional array is read - and the value printed is, as if any element of the multidimensional array is zero!?Īs I found this rather confusing, I thought it is time to take a trip to the debugger, just to confirm that variables are being read right - and I was quite surprised to see the debugger reporting `my_flash_array` as being full of zeroes, instead of the values that are explicitly specified in code. In the meantime, other people also worked on the project and made some changes (while I was doing something else), and now I'm back again at it. When I worked on that project a couple of months ago, I could just read any element of the flash array in a RAM variable, for instance `unsigned int my_val = my_flash_array `, and then it is used in some calculations, and the result of those is printed on LCD - a couple of months ago there was no problem with this whatsoever. There, the multidimensional array has to be stored in flash, because it otherwise is too big and doesn't fit in RAM. Well, the project in OP is just a stand-in for another project I'm working on. Why would you want to "debug" a const multi-dimensional array is in Flash ? If you omit the flash modifier the multi-dimensional array is in SRAM. Is it possible to somehow set up CodeVisionAVR, or Atmel Studio, so I get the actual (flash) values of `my_flash_array` shown in the "Watch 1" window?

#Codevisionavr debugger windows#

Also, if I type`my_flash_array` in the Address field of the "Memory 4" window, then I get taken to Address: "0x000000,data" (the default is otherwise "0x000000,prog"), and the memory shown there seems to correspond to what is shown for `my_flash_array`in the "Watch 1" windows (but clearly, not to what is actually in `my_flash_array` in flash memory). That is, I get the values of `my_flash_array` to be mostly zeroes - which they are not, as I can confirm that via the LED patterns. However, when I export this project for Atmel Studio, and try to debug by inserting a breakpoint in the timer interrupt, and doing a "Watch" on the `my_flash_array` variable, this is what I get:

#Codevisionavr debugger code#

The code works fine, in the sense that the LEDs change according to the bit patterns in the `my_flash_array` as expected. Then there is a timer interrupt that hits each second, increases the global counter -> then indices for access are calculated from the global counter, so we "slide" along the values in the array in sequence the corresponding value in the array is read into a variable, and then the three least significant bits of this variable is applied to PORTE pins 2, 3 and 4 (where I have LEDs, so I can see approx what is happening). and there is a volatile global counter variable. my_flash_array size: 3*4*5 = 60 (unsigned) int entriesįlash unsigned int my_flash_array = The project is simple: there is nothing in the main `while(1)` then there is a (multidimensional) array of ints stored in flash: To illustrate this, I prepared a CodeVisionAVR application project for ATxmega128A1U: flashvars_xmega.zip I just noticed that I have difficulties debugging flash variables. I am using CodeVisionAVR 3.34 and Atmel Studio.











Codevisionavr debugger