Due to the lack of flash memory i want to move code parts in a separate function library and locate the same in RAM. I thought to use the LIB166 and assign certain code modules to the RAM-address area. In addition i want be able to build and deploy (download) this RAM function library without the need to build&programm the flashed code again. Means i need the hex-files: flashcode.h86 and functionlib.h86. Is there a way to create a functionlib.h86 with the LIB166 and L166 which shares certain interface functions to a flashcode.h86? Or are there any alternative solutions?
But RAM is volatile. So you need to store any code you want to run from RAM in either the flash, or some (possibly serially connected) external non-volatile memory.
Are you sure that you have selected the correct processor for your task? The processor selection process is one of the most important steps in a development process.
I've a technical solution where a host-application always downloads via a USB-connection volatile data into the RAM and then invokes commands to the Infineon C167CS MCU. I intend to just attach the functlib.h86 to the download data and eg. invoke then any further functionlib-attach procedures (if necessary).
So ja, the MCU C167CS seem to set correctly.
Per, thank you for your response.
THE BEST WAY YOU STORE EACH FUNCTION CODE IN A HEX FILE. LOAD IT ONLY WHEN NEEDED.
What you're describing is a Dynamically-Linked Library (DLL).
The Libraries used by C166 are (designed to be) Statically-Linked - so you have a whole bunch of work to do to implement the dynamic linking...
@Andrew: ja, even i thought at a 1st glance i've to the whole Dynamic Link Lib bunch. And in fact, that can be solution.
However it think it is not necessarily required. For my embedded device/ use case a general static link could be still sufficient. But what i need is to break up the static link/build into two separated hex-files.
So i've eg. one solution in mind: 1. Reserve a RAM-Area and allign interfacing functions (addresses) to a RAM-Address area. (in case of a need assign for each function a dedicated address) 2. Build (static link) the whole stuff - leads to one total hex-file eg. flashcode.h86 3. Extract from flashcode.h86 the reserved RAM-Area parts to a separate functionlib.h86 4. Flash the flashcode.h86 and later download the functionlib.h86 on demand. 5. In case of required modifications in functionlib.h86, modify the code and do steps #2-#4 again except NOT to program the flashcode.h86 again.
What i dont like at this solution that there will be a lot of proprietary convetions/rules for the build steps. I'd prefer more a tricky solution which could be done with the given C166 Tool chain only.
View all questions in Keil forum