Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get address of variables #1

Open
sledge33 opened this issue Nov 11, 2021 · 3 comments
Open

How to get address of variables #1

sledge33 opened this issue Nov 11, 2021 · 3 comments

Comments

@sledge33
Copy link

sledge33 commented Nov 11, 2021

How do you get to know the address stored in node1.json for variables 'sig' and 'amplifier'? Maybe you can provide a little user manual how to add a new variable to 'demo.ino' and measure it with your application.

edit: I got the solution.

  1. create .elf file and .map file (both possible with Arduino IDE)
  2. in map file you can see the address from each variable
    detailed information, see: https://forum.arduino.cc/t/getting-the-map-file/72278/15
@feversky
Copy link
Owner

yes, you are right.
firstly the variables has to be defined in static or gloabl scope, then we can easily get address info from elf file. there are lots of elf libraries
the json file comes from the idea of automotive a2l file, but much simple.

@sledge33
Copy link
Author

Thanks for the hint with the python libraries for elf file parsing. I did not know about it. By the way, just for your information: there is a new version of pyxcp (0.16.x). They merged base.py to master.py (christoph2/pyxcp@9413aeb). To run your application with new pyxcp lib. I needed to download base.py and copy it to the correct folder but in the end I got it run.

@sledge33
Copy link
Author

I declared an array in my c-program:

byte PinStates[] = {0, 0, 0};

Is it possible to measure it in a graph window as signal? (so I will get 3 signals) How has "node1.json" to look like?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants