This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Hardware reset

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

Parents
  • 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
    

Reply
  • 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
    

Children