2016-02-26 03:16 AM
Hi,
I'm trying to use Keil simulator to test my application. I'm writing some data to flash memory, using the HAL drivers generated by cubeMX. After the write operation, the flash memory doesn't change. I'm just wondering if it is possible to simulate this? Thanks, #flash #stm32f #rewrite #keil-simulator2016-02-26 03:47 AM
Assume the simulator is very poor at replicating gate level functionality and peripheral emulation.
You should test on real hardware without a debugger attached.2016-02-26 04:02 AM
Thanks for getting back to me.
The idea is to write unit tests that ideally run on a simulator It feels like there must be a way to modify the data in ROM if its simply a simulator... If I try to set the value of a register at a ROM address, nothing happens either - so I'm assuming it's to do with Keil's simulator that doesn't allow those registers to be edited?2016-02-26 05:18 AM
When there were a few dozen simple ARM chips Keil/RealView had a good simulator for them, now there a thousands, with complex peripherals, and the problem is unmanageable.
Also back then test board run hundreds of dollars, today about ten dollars. If you are a fully paid up Keil customer you could perhaps ask them for specific support, or allow you to build a peripheral emulation layer. These things wouldn't be gate level emulations, which would be a whole different level of cost, but rather someone's interpretation of the reference manual, mixed with some hardware validation and design skills. I generally think of this as comparing two interpretations of documentation, rather than comparing against reality. I see diminishing value there, and effort would be better applied to rigorous static analysis. You could also build your own test framework.2016-02-28 09:48 PM
Yeah, I agree. But I simply want to write to memory and see that the correct things are written. I'm writing a double buffering settings module and would like to unit test using our unit testing platform which is based on the simulator
I did manage to get around this. I noticed that I can edit the section of flash below the application. It pretty much works like RAM memory - which isn't ideal, but is good enough for now. Anyways, thanks for your insights.