We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
lpc1768 board or the MCB1700
does anybody know how to switch bins files using the hardware reset route, so when I press the reset button it will switch bins.
I know for software it could be something like this perharps
<
> int main (void) { for (;;) If extern "C" void lpc1768_reset(); flash.write = binfile1 else flash.write = binfile2 endif } <
>
thanks,
thomas
I am I am trying to time travel ok:)
the magic chip I have yes do you understand loads the bin file with the future time into the flash memory you understand I have second bin that is the past ok :)
I want to change the past bin so it is the future bin ok
so for me to do this I have to change the time stamp or rename the file ok.
Do you understand what I am I am trying to do I am
Then use a hex editor to go back to the future...!
But no standard LPC17xx processor have a file system. It's just a dumb processor.
And the boot loader shipped inside the LPC17xx do not have any functionality to look for any files anywhere to program into the flash.
So all your references up until now aren't telling us any single thing about what software you are trying to fight with.
A standard MCB1700 board do not contain any file system unless someone have added such software to the board. And it is then that specific implementation that controls how to access files. How to see if there are date stamps associated with the files. And it is then that specific software that may potentially copy files from an external flash memory into the internal flash of the LPC17xx processor. Or if you have a LPC17xx processor that do support running from external memory.
But whatever information you do not supply to us, can not be understood by us. We can't guess. So we can't help.
The one who supplied you with a preprogrammed board should know the answers to your questions.
Do you perhaps know how to fix this code to make the rename in my software to start working
int rename(const char *old, const char *new) { return -1; }
I have been told something needs correcting or is wrong ?
Just ignore this guy, it's a joke.
this is not a joke, I am working with two boards one is the MCB1700 board the other is the MBED, that code I posted is from the Mbed library but they are only a very small ground and never very helpful or clever.
this is not a joke
well, the above post is
"Do you perhaps know how to fix this code to make the rename in my software to start working
I have been told something needs correcting or is wrong ?"
well Peter Jones is a joke and so is his business and all the employers he hires or is it theo?? which one.. they both have shares in your company right
What "your business"? This is a forum for end users. We who write here are Keil customers - not Keil employees.
By the way - post after post after post and you finally managed to mention mbed. Shouldn't mbed have been the first thing mentioned in your original post? How would anyone on this forum be able to answer any single question about mbed if you don't even tell that you do work with an mbed product?
Who the hell is Peter Jones? Why should we care? WTF!?
see you on mars later.
see you on mars later won't be there women are from Venus :)
Erik
Well I have so many stars to choose from I am spoiled for choice, I heard lyran's women think your all annoying and never very professional in the forum what so ever:) like kindergarten children.
I found code anyway
#include "mbed.h" #include "rename.h" #include "ConfigFile.h" LocalFileSystem local("local"); // Create the local filesystem under the name "local" ConfigFile cfg; int lastStat; int main(void) { /* * Read a configuration file from a mbed. */ cfg.read("/local/lastStat.cfg"); * Read a configuration value. */ if (cfg.getValue(key1, &value[0], sizeof(value))) { if (lastStat.cfg == 1) { cfg.write("/local/lastStat.cfg", "0"); } else { cfg.write("/local/lastStat.cfg", "1"); } if (lastStat.cfg == 1) { file_rename("/local/Test.bin", "/local/new_name.old");} if (lastStat.cfg == 0) { file_rename("/local/new_name.old", "/local/Test.bin");} // int main() { //FILE *fp = fopen("/local/Test.txt", "w"); // Open "out.txt" on the local file system for writing // fprintf(fp, "Hello World!"); //fclose(fp); //file_rename("/local/Test.bin", "/local/new_name.old"); }
and you all lied about the time stamp as well, http://www.keil.com/support/man/docs/rlarm/rlarm_lib_rl_time.htm
FRESULT set_timestamp ( char *obj, <span>/* Pointer to the file name */</span> int year, int month, int mday, int hour, int min, int sec ) { FILINFO fno; fno.fdate = (WORD)(((year - 1980) * 512U) | month * 32U | mday); fno.ftime = (WORD)(hour * 2048U | min * 32U | sec / 2U); return f_utime(obj, &fno);
Maybe you should all talk in code instead of the stupid comments you always make.
I found code anyway so that was what it was about, you wanted us to do it for you.
Congratulations sweetheart, you were given a real pearl. Enjoy from it while you can.
A standard MCB1700 board do not contain any file system unless someone have added such software to the board. And it is then that specific implementation that controls how to access files.
How many times did we ask you to supply specific information about what software you did run, since the processor itself don't have any file system?