Stimufile ?

Go To Last Post
17 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My project is for Mega328P.

 

I see in the Debug menu, greyed-out entries for "Set Stimufile" and "Execute Stimufile" but nothing was found doing a search in the Help. I could REALLY use that, right now! Is it absent? Is it absent for M328? Is there documentation, somewhere? Is there an alternative? I need to generate an interrupt input with a period of 10ms and a width of 50us (data ready alert from a sensor - that is the trigger for almost everything in the system).

 

Thanks

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Last Edited: Fri. Feb 19, 2016 - 07:19 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are you debugging on-chip? Stimuli files are only available in the Simulator. (For on-chip debugging the real I/O is of-courswe used - stimuli files simoulate I/O when debugging in Simulator).

 

The current Studio help is worthless (=non-existent) for stimuli files. Many previous discussions here on AVRfreaks, and some of those might have clues to the file format.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I went to the webdoc, and into Studio 7, and did a search for "stimulus", "stimuli" and other similar words. No hits.

 

Why is the Simulator documented separately? Is it usable from outside Studio? Can I write my own app on top of Simulator? (If so, then there must be some documentation on the interface, right? And that would be the same interface as the one used to communicate with the hardware debuggers, right ;-) )

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

Last Edited: Fri. Feb 19, 2016 - 09:44 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

...that's been there for a while. 

Considering one of the sections is titled Key Differences from AVR Studio 4 and AVR32 Studio, one could conclude it's been up there quite a while...

Greg Muth

Portland, OR, US

Xplained/Pro/Mini Boards mostly

 

Make Xmega Great Again!

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The simulator itself is bundled in Studio like all the other tools, or rather tool-interfaces (Atmel-ICE, JTAGICEmk3, ...). The simulator is by design implemented to behave as similar to the other tools as possible seen by the debugger in backend, making it just another tool. But where the other interfaces communicates through a hardware debugger with an OCD, the simulator accesses the registers and memories of the device directly. No clocking of the device. It's a simulator, so it's all just memory locations. But where you apply stimuli on a kit by moving jumpers, pressing push-buttons and shorting pins, the simulator needs some special handling. It used to be a part of the whole Atmel Studio help, but during some reorganization it was moved out to a separate doc for, to me, unknown reasons. I have added some more stimuli file examples, but they don't seem to have reach the web yet.

Now, you could probably write your own frontend communicating with the backend, since it's basically just a TCF protocol, but writing your own app on top of the simulator would be more complicated since it's so integrated into the backend.

 

... BUT, the simulator models are a different ball game. You see, the simulator models are completely independent entities (.dll's) with an API for run, step, break, set breakpoint, read/write memory, read/write registers,... The simulator actually just forwards all the runcontrol messages to the simulator model API. For instance, it wouldn't be too difficult to make an additional target to this: http://gdbproxy.sourceforge.net which loads a simulator model... ...  Not difficult at all actually... .. .

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ahh, I had not specified a debug tool. Though I am pretty sure that I had done a "Start Debugging and Break", several times. They really OUGHT to grey out other members of the Debug menu when no debug tool has been selected, OR be more consistent about the default case.

 

When I went to Project Properties > Tool and selected the Simulator as the debug tool, there is an area of the Tool pane about Stimuli File. Thanks for the documentation links. It is interesting that the Debug menu refers to Stimufile while the Project Properties > Tool area refers to Stimuli File. Consistency!

 

Thanks!

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Read through the docs. That will certainly "solve" the immediate challenge I have. Nice to see the logging capability.

 

It would be REALLY helpful if there were some word in the Studio Help about stimulus operation, if only a link to the relevant document. After all, there is discussion of the simulator in Studio Help. It leaves you with no clue that (a) it even exists or (2) where to look for more information.

 

BUT, an even better world would be a stimulus mechanism that could behave like a peripheral, actually responding conditionally, to the state of some register (bits). For example, a TWI or SPI device. Guess that is what Proteus is supposed to do, but it would be a big plus step for an AVR (Studio-based) simulator!  

 

Dream on!

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ka7ehk wrote:
Guess that is what Proteus is supposed to do

"Proteus" was going to be my answer as I read the first sentences of that paragraph ;-)

 

But where do you draw the line with simulators? Surely there comes a point where it's just simpler/easier to put real code in a real AVR wired to real peripherals with a real JTAG/debugWire/PDI OCD interface and see what the real thing actually does?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Cliff -

 

Of course, but there is that "zone" between concept and hardware realization. In my case, the board won't be here for a couple of weeks and I would really like to know if my code will run as it is designed to do. It all has to do with "time to market"!

 

I know, you are going to propose: "Just test it on an arduino!". Easier said than done when some of your chips are BGA and you need that board that is coming from the fab house. That is the problem of prototyping non-DIP devices in a DIP world.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If this is something commercial then this might be one of those occasions when the £300 (or whatever it is) for Proteus VSM looks like a good investment ;-)

 

It'd be kind of interesting for one of the regulars to own and know Proteus - most of us cannot justify the cost for what is otherwise effectively just a "cool toy".

 

((of course there is the same route that a number of posters here have taken - but I'd never be tempted to use pirate software - even as a valid "trial" - as you don't know what horrors it may be wreaking!))

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In case anybody is interested I've put the AVR simulator version of the gdbproxy here: https://github.com/avrsimulator/...

 

It's not perfect. Far from. But it works, and it is cross platform. :-)

 

-Jan Egil

 

PS! This is NOT an Atmel product, so you won't get any help with this from Atmel Support. But, it's open source, so you can figure it out yourself :-)

Last Edited: Sun. Feb 21, 2016 - 04:16 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you Jan Egil (-:

 

Now to make some sense of it all.

 

(Good thing I just started a new attempt at reading up on GNU Autotools.. :-) )

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you want to build for Linux it really isn't much to it. Just "./bootstrap && ./configure && make".

To cross compile for windows that would be "./bootstrap && ./configure --build=x86_64-unknown-linux-gnu --host=i686-pc-mingw32 && make"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all,

 

Apologies for necroing this thread; however, it seems that at regular intervals, I need to refresh my memory about Atmel Studio simulator stimuli files, and this thread is the first that pops up in my searches, so I click it - and then I end up in "the rabbit hole", so to speak... So, I think it's appropriate to jot down some notes about the relevant documentation here.

 

To begin with, - as of 2020 (time of writing of this post), this link:

 

 

... is dead; or maybe, not really dead, however it redirects to https://www.microchip.com/ - which does not help much, since if you type "simulator" in the search on that page, you get a bunch of results unrelated to Atmel Studio 7. If you type "stimuli" in that search, the first result is a link to the Atmel Studio 7 product page https://www.microchip.com/mplab/... (the other hits seem unrelated).

 

However, the above link is still in Google Cache results, - and thankfully, it is also in the Internet Archive; the last crawl update in the Internet Archive (which is not a redirect) seems to be this:

 

 

 

Since I often need to recall information about specifically this:

 

ka7ehk wrote:
an even better world would be a stimulus mechanism that could behave like a peripheral, actually responding conditionally, to the state of some register (bits).

 

... I should note the above page (cached in the Internet Archive) states:

A stimuli file is a simple ASCII plain text file containing stimuli commands, one command per line. Apart from comments there are only three kinds of commands: delays, assignments and directives.

... meaning - no conditionals in stimuli files (as there are no conditional commands as part of the directives).

 

 

From a page in the same section ( http://web.archive.org/web/20171... ), it seems this cached/archived documentation was intended for Atmel Studio 6.1.

 

As far as Atmel Studio 7 is concerned, the product page ( https://www.microchip.com/mplab/... ), under the Download, mentions two relevant documents:

 

 

Note that these are the PDF documents, which are searchable - which is what I need.

 

The same documents can be found in a web version on https://onlinedocs.microchip.com/ - however, here the search seems to be broken, since I can click on the corresponding links for either of the above two documents, search for "simulator", and I'll get 0 results back ("No documents found").

 

That being said, the Getting-Started-with-Atmel-Studio7.pdf has 0 references to "stimuli"; and the Atmel Studio 7 - User Guide PDF link requires, for some reason, a myMicrochip login. Also, do note that these PDFs are *not* included with the Atmel Studio 7 installation (at least not in the `C:\Program Files (x86)\Atmel\Studio\7.0` folder, where my version of Atmel Studio got installed).

 

Once you register and login and get access to atmel-studio-7-user-guide.pdf, then you can look up "stimul" - there are 4 results in all (including both "stimulus" and "stimuli"), however, there is no trace of explanation of the stimulus file format, as in the above Internet Archive links. So, I guess as of time of this writing, the authoritative documentation on the stimuli file format is in the Internet Archive.

 

Last Edited: Mon. Mar 16, 2020 - 09:05 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sdbbs wrote:
Also, do note that these PDFs are *not* included with the Atmel Studio 7 installation

Indeed - but Studio has an "Add-In" feature for documentation which is where I was able to find the info to learn about Stimulus files recently.

 

See this post https://www.avrfreaks.net/comment/2871031#comment-2871031 where I was successful at injecting a character into the simulator USART. However that method would be tedious for injecting a longish string. I'm surprised there isn't a better way.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

N.Winterbottom wrote:
I'm surprised there isn't a better way.
It's called "Proteus" ;-)

 

(will cost you €300+ for the privilege of course)