Skip to content

Commit

Permalink
Merge pull request #111 from POETSII/boot-without-start
Browse files Browse the repository at this point in the history
Support boot in hostlink without starting the cores.
  • Loading branch information
mn416 authored Aug 31, 2021
2 parents e4b57b4 + f3f0a45 commit b4dfa34
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
13 changes: 7 additions & 6 deletions hostlink/HostLink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ bool HostLink::canRecv()
}

// Load application code and data onto the mesh
void HostLink::boot(const char* codeFilename, const char* dataFilename)
void HostLink::loadAll(const char* codeFilename, const char* dataFilename)
{
MemFileReader code(codeFilename);
MemFileReader data(dataFilename);
Expand Down Expand Up @@ -469,12 +469,13 @@ void HostLink::boot(const char* codeFilename, const char* dataFilename)
}
addrReg = addr + 4;
}
}

// Step 3: start cores
// -------------------

// Send start command
startAll();
// Load application code and data onto the mesh, and start the cores
void HostLink::boot(const char* codeFilename, const char* dataFilename)
{
loadAll(codeFilename, dataFilename);
startAll();
}

// Trigger to start application execution
Expand Down
3 changes: 3 additions & 0 deletions hostlink/HostLink.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ class HostLink {
// (Only thread 0 on each core is active when the boot loader is running)

// Load application code and data onto the mesh
void loadAll(const char* codeFilename, const char* dataFilename);

// ... and start
void boot(const char* codeFilename, const char* dataFilename);

// Trigger to start application execution
Expand Down

0 comments on commit b4dfa34

Please sign in to comment.