Blog > How do you get to an array location in the memory map?

Home Forums ViewPort How do you get to an array location in the memory map?

This topic contains 2 replies, has 2 voices, and was last updated by  Anonymous .

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #10677


    I’m new to this tool and must be missing something. I want to browse through the values of large arrays I might set up. I have something like the following (partial code):

    _clkmode = xtal1 + pll16x
    _xinfreq = 5_000_000

    long arr1[500]
    long a1
    long b1
    long c1
    long d1
    long e1
    long f1
    long arr2[200]
    long arr3[300]

    vp : "Conduit"

    PUB startIt

    vp.share(@a1, @f1)


    My arr1 array shows in the watch panel as a1 and shows the first value but the address does not point to the start of the array. [b:1vw8mfbs] Is there something I need to press to get to the start of any of my arrays in the memory panel?[/b:1vw8mfbs]

    p.s. I have tried simply setting up the vp.share to span my arrays and other variables in various combinations. The tool gives me an error about the number of variables if I put in an array of size (min 100). If I only put in the array as the only variable shared then the address in the watch panel points to the beginning of the array as desired.



    This wasn’t easy in 4.73, but is in 4.74+
    Either include the array within your share statement like this:
    long a,b,array[100],c
    PUB demo

    or use the "vp.array" to share an array:
    long a,b,c,array[100]
    PUB demo

    Then, in the watch list you can see the first value, and you can click on the address to view the memory map with all items in array highlighted. Press "update" to update the memory map.



    Super. That’s just what I needed. Just getting to the start of any of my arrays is great.

    The version of ViewPort I was working with was 4.5.4 or something. That was the default download at the time. I’ve now downloaded 4.7.4 and it works fine.

    I finally learned how to use the configuration utility to name my variables. Neat stuff. Great tool.

    Now, I’ll have to buy it…

    Thanks for the help.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.