![]() Say you want two observer, one for Tracing and another for Logging. On the other hand, the entire environment is observed by the Observable.So Observable acts as the container for all the Observers. The Observer is the individual objects that generate notifications. IObserver is actually the individual Observers that when you add to the system will eventually generate notification to the environment.įor example, say you want to add a tracer to an environment, so that when each object changes its state, you want to get notified and hence write Trace elements based on those state changes. In this post, I will discuss how you could use IObserver and IObservable to implement you own notifiers. Microsoft also builds forth its Reactive Framework (I will discuss about it later) based on Observer pattern and lets us use it when Observer is required. These interfaces gives you a standard to develop Observable pattern and also recommends you to use it rather than doing it of your own. NET base class library, there are two interfaces introduced viz, IObservable and IObserver. The observer should contain methods that enables you to subscribe or unsubscribe individually so that when you subscribe for a notification, it will keep on creating notification until you explicitly unsubscribe the Observer. Lets recap this a bit more.Īn observer is a container which observes each element individually and notifies you when the object state is modified. If you have read my other post, you might already know what is an Observer and why it is required. I stepped through the assembly code and made sure all instruction addresses were in flash.As few people told me to implement an observer in my last post where I just showed how to use it, here is the post where I am going to clear out confusions for you. The address of all the functions are in flash. I suspect that the ExitBoot routine isn't being called on reset, but I can't find a good reason why. I then modified the exit boot routine to just cut out everything to try to make it as similar as possible to the direct function call above like so:Īnd it still doesn't work after reset, but does work in jtag debug mode. The original code for the flash app returns the same address to the rest of the ExitBoot routine. I have pretty much the same setup: (flashing (with jtag) the blinky light flash app on sector C Flash and loading it properly, then flashing (with jtag) the bootloader app to sector A, and not erasing other flash sections).Įverything works when debugging, but when I switch the boot mode switches on my launchpad and reconnect power, the bootloader lights blink, but then it hangs.Īt the end of my main function in the bootloader, everything works after reset! ![]() This can be done by power-cycling the device and loading only the project symbols after reconnecting. The key is to make sure CCS doesn't load anything into RAM that would not be present after a power-cycle. map file for initialized sections loading directly to RAM. Try running your kernel with the debugger attached to debug where things go wrong. Make sure all initialized sections start in flash (then run from RAM).You can also try initializing the PIE vector table with your own ITRAP handler - maybe toggle a different IO there or toggle at a different rate. If you can determine where in the boot ROM it gets stuck and if that corresponds to an ITRAP. If the API tried to modify the flash then anything in flash will no longer be available to the CPU for running the API. The flash kernel, constants used by the flash kernel, or the flash API call-back function, were not copied and available from RAM.You can monitor the reset pin with a scope to see if the device does reset. If this occurs the device should have gone through the same boot sequence and the LED would flash again so this may not be it. What I observe is that the bootloader lights will blink as expected, but then it just seems to hang, the times I have been able to see what instruction was executing, it looked like it was stuck in boot rom somewhere. cmd file and calling initFlash and doing some ramfuncs stuff. The problem comes when I try to move the f28069_can_flash_kernel to be stored in flash A, doing the exact same steps I did to move the gpio example to flash, namely, Using the other. (I used the _c_int00 memory location from the gpio example map)ģ) I modify the target config for the f28069_can_flash_kernel to not erase flash sectors.Ĥ) I flash the f28069_can_flash_kernel using the RAM linker file, and everything seems to work ok, get the bootloader blinks, and then the gpio example blinks I am slowly piecing together a custom can bootloader and am stuck with the following setup:ġ) I programmed the gpio example into flash sector c, and can see it working just fine during debug, or after fresh rebootĢ) I then modified the f28069_can_flash_kernel to just blink the leds a bit and then return a hard coded entry point.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |