I'm building a new project, and need to choose an MCU board.
What I'm trying is firmware's partial update. I will appoint part of firmware(like functions) on specific flash sector, and update only the sector so I don't need to erase&write the whole flash.
On my previous project, STM32F4DISCOVERY worked really fine but I wonder is Arduino could be an option.
Is it possible to set an memory address for firmware(i.e. funcA->0x0030, funcB->0x0090)
Is there a way to jump flash cursor(execute the code on specific memory address)
Can Arduino dynamically erase/write on flash memory itself?
Boards.txt file holds a reference to the Linker Script where memory regions are configured including starting address and length of flash and RAM.
FlashAsEEPROM is a library used to write/read the flash memory where EEPROM is not available.
Related
I am on Windows 10. I want to write a function (in R) to copy the files stored in a camera (actually in the SD of the camera, but I cannot just read the memory card in the PC), to a different storage unit (say, the pc or an external HDD).
The camera is connected to the PC via an USB cable.
The problem I am facing is that, when opening the File Explorer, the camera is showing up as a link under "This PC" with no letter to indicate the drive (e.g., 'G:/').
While I can see the files using the file explorer window, I cannot find a way to get to those file from a cli type of interface (e.g., the command prompt, or the R console).
Googling, I found that 'This PC' is not a folder but rather a link to something in the registry called CLSID for which the identifier should be {20D04FE0-3AEA-1069-A2D8-08002B30309D}. However this is very confusing to me and I cannot figure out how to use this information.
Is there a way to do it? And if so: how?
Please consider I do not know much of commands from prompt (way better off in R).
A CLSID is just a GUID. My computer is a implementation of IShellFolder.
My Computer is part of the shell namespace. Several entries in the shell namespace are virtual (Control panel, scheduled tasks etc.) and cannot be accessed with low-level file functions nor cmd.exe.
While it would be possible to develop a tool that does something like shellcopy Computer\MyCamera\*.jpg x:\backup, I'm not aware of any existing tools that do this. You might have to code it yourself.
In the old days you would call SHGetDesktopFolder to get the root and then use the returned IShellFolder to navigate but these days it is simpler to use IShellItem instead.
To do this it is crucial to understand how IShellFolder and PIDLs work. See Introduction to the Shell Namespace for more information...
I have a project that is divided into two sections
each one of them requires an independent sketch,
I wanna upload the two sketches into the same Arduino card without one of them ruining the other's work, is that possible? if yes how to please
if no any other alternatives
No.
But you could combine both rather independent parts and add some logic to find out which part should be active, currently.
E.g. When a button (-combination) is pressed at restart, Arduino runs the test mode, else it runs in standard mode.
You can have multiple tabs in the Arduino IDE to handle the modes more independently, but all code is coexisting in flash memory after upload.
What you can do is have two seperate bin files (IDE menu Sketch / Export compiled binary) and have both of them include OTA code so you can update the binary as needed. The bin files can be stored locally on an SD card or remotely on a web server if the board has networking capabilities. Once updated the processor will reboot and start with updated code.
Look at ArduinoOTA for more information.
I guess I'm having a basic understanding issue regarding the nodemcu/ESP8266 when it is used with the Arduino IDE and/or visual micro (for MS Visual Studio).
Everytime I upload a program/sketch which is obviously written in C in this case, it is compiling and uploading a binary of about 280kb, even if it is only a simple "blink" example.
Is it some kind of firmware being uploaded everytime or is it just monsterious libraries needed for the ESP to work with the Arduino IDE?
If it is firmware, do you normally "update" the firmware to a more recent build when working with the Arduino IDE? When using the nodemcu LUA firmware, there are periodic updates.
Thanks!
Basically, you build the firmware, which is a combination of your own code, and lots of other code/libraries.
All the other parts are part of the Arduino ESP8266 core, which does indeed get updates (it lives here: https://github.com/esp8266/Arduino). And it itself contains the Espressif SDK, which also gets updates (https://github.com/esp8266/Arduino/tree/master/tools/sdk).
Like NodeMCU you can get periodic updates, but they are of the core, and the only way to get them into your firmware is to recompile your sketch.
This is completely normal - When writing code for an interpreted language like Lua for the ESP/NodeMCU, you're just uploading what is a relatively small text file(s), as the code needed to run it is already on the chip, and doesn't change.
However, when you start working with compiled languages like C (With the Espressif SDK only, for example), or C++ with the Arduino IDE, you are replacing the entire firmware each time your code changes. This includes the TCP/IP stack, WiFi management, the logic controlling the PHY/MAC interface, the mini OS, and a host of other bits to make your ESP8266 work. Even if your code appears to be just a simple "blink" sequence, there's a lot of code running behind the scenes to make it possible, leading to the large sketch size.
Generally, every change to your sketch code will produce a complete copy of everything needed to create a bootable, runnable binary for the ESP8266. This is what is causing the 280KiB file. Since each copy of your code includes the newest (Or at least whatever is in your IDE at the time) copy of the system level code, there is no separate update process - Each time you upload your sketch, the system code is updated too.
Additionally, there is some extra overhead from the Arduino abstraction on the Espressif SDK, leading to a larger resulting binary size.
I am trying to port SQLite to uCOS RTOS running in STM324xG_EVAL board. I am using micrium File system for making RAM based file system used by SQLite. I have tried with different build configurations and used sqlite3_config API to define different memory regions like heap, scratch and page memory. I am able to initialize (sqlite3_initialize) and open(sqlite3_open) DB. But when I am trying to create tables(sqlite3_exec), I am getting errors like "journal file not found", "out of memory". What may be the issue
Thanks,
Shijo Thomas
I am trying to get my phone to accept USB Accessory mode and run the DemoKit connected to the Arduino ADK. My ROM did not contain the appropriate files so, I decided to do it myself.
First the specs
My phone: Samsung GT-I9100
My ROM: 2.6.35.7-I9000XWJVZ (rooted)
Firmware: 2.3.6
I've succeeded before in copying the .jar .odex and .xml file to the appropriate folders. Although it completely bricked my phone and was stuck in a boot loop. Now, recovered, I want to give it a second try.
What is this .odex file that every other .jar file has in the /system/framework folder?
Do I need to build/copy the .odex file myself (read something that Dalvik does JIT compiling)?
Is it possible that in my previous attempt, the copying of the .odex (that I got from another phone I9100), bricked mine?
I know I was careless in my previous attempt. Now, I want to approach the subject with a bit more knowledge...