Comments (1)
Hey @nandojve!
You are right about relevance of sysbus GetSymbolAddress <symbol-name>
— you can use that method to acquire address of any symbol located in the .symtab
section (pretty much any global symbol for that matter).
$myVarAddress=`sysbus GetSymbolAddress "my_var"`
Now you can read contents of this using appropriate sysbus
method, e.g. assuming that variable in question is unsigned int, you could do:
sysbus ReadDoubleWord $myVarAddress
Other methods you would want to use are:
sysbus ReadByte <address> # reads single byte, returns as byte
sysbus ReadWord <address> # reads two bytes, returns as unsigned short
sysbus ReadDoubleWord <address> # reads four bytes, returns as unsigned int
sysbus ReadQuadWord <address> # reads four bytes, returns as unsigned long
sysbus ReadBytes <address> <count> # reads <count> bytes, returns as array of bytes
There are also dual sysbus
methods for writes:
sysbus ReadByte <address> <value>
sysbus ReadWord <address> <value>
sysbus ReadDoubleWord <address> <value>
sysbus ReadQuadWord <address> <value>
So, lets assume that my_var
is global, unsigned int; the robot test would look something like this:
*** Test Cases ***
Check If my_var Is Equal To Zero
Prepare Platform
# Store my_var address in Robot variable
${MY_VAR_ADDR}= Execute Command sysbus GetSymbolAddress "my_var"
# Move simulation by one second forward
Execute Command emulation RunFor "00:00:01"
${MY_VAR}= Execute Command sysbus ReadDoubleWord ${MY_VAR_ADDR}
Should Be Equal ${MY_VAR} 0 my_var should be equal to zero
from renode.
Related Issues (20)
- STM32H7 Timer triggered DMA sampled ADC
- Compilation of VerilatorIntegrationLibrary in Xcelium fails HOT 1
- Support for MK10DN512VLQ10 NXP Kinetis)
- Renode v1.15.0 Fatal error in Mac HOT 1
- STM32H7 I2C
- STM32H7 SPI
- STM32_Timer Produces error HOT 6
- STM32 F2 and H7 EMAC
- Support of an ethernet device driver (litex_vexriscv board) for Zephyr
- Updating BME280 I2C sensor value using python script. HOT 1
- Save statefile inside a Hook (it hangs) via python script HOT 3
- Read value from GPIO
- hi i am trying to run gdb for blinky which is using nordic-blinky-zephyr.elf and using nrf52840 board when i am trying gdb not working HOT 1
- Possibility to synchronize simulation time with real time HOT 1
- Feature Request: Ethernet Support for Cortex-A53 Linux in Renode HOT 1
- Documentation: How to add a custom C# peripheral and testing it ? HOT 1
- `InvalidOperationException` is thrown when invoking a method via reflection HOT 2
- wish: rtos awareness for GDB server HOT 2
- How to use buildroot with renode HOT 2
- Failed to Flash from the eMMC in the Icicle Kit Machine in Renode HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from renode.