Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support boot in hostlink without starting the cores. #111

Merged
merged 3 commits into from
Aug 31, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions hostlink/HostLink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,8 @@ bool HostLink::canRecv()
}

// Load application code and data onto the mesh
void HostLink::boot(const char* codeFilename, const char* dataFilename)
void HostLink::boot(const char* codeFilename, const char* dataFilename,
bool start)
{
MemFileReader code(codeFilename);
MemFileReader data(dataFilename);
Expand Down Expand Up @@ -473,8 +474,8 @@ void HostLink::boot(const char* codeFilename, const char* dataFilename)
// Step 3: start cores
// -------------------

// Send start command
startAll();
// Send start command, if desired
if (start) startAll();
}

// Trigger to start application execution
Expand Down
3 changes: 2 additions & 1 deletion hostlink/HostLink.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ 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 boot(const char* codeFilename, const char* dataFilename);
void boot(const char* codeFilename, const char* dataFilename,
bool start=true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pure pedantry, but could this be nicer by adding loadAll(), to load a instr binary onto everything, and rewriting boot to boot(...) { loadAll(...); start() }?

Using a method called boot as a broadcast write feels confusing! Otherwise LGTM.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quite right, addressed in e11a4d9.


// Trigger to start application execution
void go();
Expand Down