Application data | Cypress Semiconductor
I’m new to Psoc and in general not the most skilled in embedded programing....but it’s a work in progress.
I would like to build a small control system with capacitive touch for controlling different electronic devices mainly through rs-232.
If i wore to hardcode the application i firmware that would be easy, but i want the user to be able to change the behavior of the system (if for example he byes a new TV) with a simple pc program and fill in the different rs-232 strings and delay between commands and witch button led lights etc and send the configuration via USB to the psoc 5. The psoc will store the configuration in nonvolatile memory and execute parts of it when a button is pressed.
In other words i want to have a firmware that is fixed and able to receive a config and store it and run the sequence when asked for.
iv come up to the following ideas so far:
- Let the pc program package the information i fixed length strings and tag each string with a identifier of the content ex. 0x01=string, 0x02= delay, 0x03= blink led etc. followed with the payload ex the RS-232 string. Store the config in onboard EEPROM. Read the button corresponding span of the eeprom and execute it when asked for. Pros: cheep. Cons: might run out of space in eeprom. Limited flexabilite in long string etc.
- add a SD-card and implement a filesystem on the psoc. Send the configuration to the psoc in "plain text" and read the corresponding lines in the file and act on the content when a button is pressed. Pros: human readable. There is room to grow and make a more complex solution. Cons expensive and takes up boardspace that i don’t have.
Don’t want the user to have to have psoc installed and have read/write axcess to the firmware and compile a new program and bootload. Instead, is it possible (or reasonable) to add a compiler to my custom pc program and let it compile the user config changes and add the fixed firmware and make a new hex file and bootload that in the system? Sounds ehhhh... very hard.
Im hardly the first person who wants a partly reconfigurable userapplication running in a firmware on a embedded system, right?
How is it normally done? Any ideas?