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
It is a magic chip that looks for the time stamps which I don't have access at the moment to the code, they are store on the flash memory but not programed into it yet.
If my code is like this for rename
62 63 /* Function rename 64 * Rename a file in the filesystem. 65 * 66 * Variables 67 * oldname - the name of the file to rename. 68 * newname - the name to rename it to. 69 * returns - 0 on success, -1 on failure virtual int rename(const char *oldname, const char *newname) { return -1; };
How do I rename files in ARM style
I have tried
rename *out.txt AS *yes.txt;
but it does not work
There are no "ARM style" file rename.
And what is "magic" here?
If someone have given you a board with a standard LPC17xx processor but with a custom software that have some magic logic in it, you will obviously have to ask that person what magic there is - the documentation for the preprogrammed software.
I do know how to use the software Flash Magic to download software to a LPC17xx chip. But that doesn't involve playing with any time stamps on any binary files stored in any flash somewhere.
Is it possible for me to add my own code into lpc17xx
how would I add stat -c to read the time stamp and touch -d to change the time stamp much like it is in linux does any arm exist??
virtual int stat(const char *-c) { return -1; }; virtual int touch(const char *-d) { return -1; };
#!/bin/bash # BASE_OLD=/mnt/old-raid BASE_NEW=/mnt/new-raid cd $BASE_OLD find . -type f | while read fname do $BASE_NEW/${fname} TS=$(stat -c '%Y' "${BASE_OLD}/${fname}") TIMESTAMP=$(date -d @${TS} +'%d %b %Y %R') touch -d "${TIMESTAMP}" "${BASE_NEW}/${fname}" echo "${BASE_NEW}/${fname}" done
Does anybody here understand what the OP wants from our lives? Brother, it is not a PC your working with, OK?
Why don't you just tell me the ARM code for getting the time stamp and changing it then, because I know it exist.
The "ARM code" will require you to address the chip's RTC (I think it has one) or a network source, hardware timer etc.
And I can use that to change the .bin time stamp or do I need to change the lpc17xx time stamp so it is newer date than the .bin . if you understand what I mean instead of changing the .bin time stamp are you saying to just change the lpc17xx chips time stamp.
If your program contains the ANSI C macros __TIME__ and/or __DATA__ you can expect a "time stamp" in your .bin files regardless of LPC1768 RTC settings. You really need to first _understand_ what you are doing (and talking about) and to my understanding you don't. Merging bin files? Are you sure that's a good idea?
I am student with no money so the boot loader method is not a option at the moment.
How exactly is a bootloader related to you not having any money?
A .bin file contains no "time stamp" of any kind unless __TIME__ and/or __DATE__ are compiled with the sources.
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
DO you really think that I did not already know this, for something that should have taken 3 mins of time today has taken how long.
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.