Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marek
firmware
Commits
d726f2e6
Commit
d726f2e6
authored
5 years ago
by
q3k
Committed by
Serge Bazanski
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
epicardium: load l0dable when present, for testing
parent
45cd3ec4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
epicardium/main.c
+20
-7
20 additions, 7 deletions
epicardium/main.c
with
20 additions
and
7 deletions
epicardium/main.c
+
20
−
7
View file @
d726f2e6
#include
<stdio.h>
#include
<stdlib.h>
#include
<ff.h>
#include
"max32665.h"
#include
"uart.h"
#include
"cdcacm.h"
...
...
@@ -100,17 +102,28 @@ int main(void)
LOG_INFO
(
"startup"
,
"Initializing dispatcher ..."
);
api_dispatcher_init
();
LOG_INFO
(
"startup"
,
"Testing l0der ..."
);
struct
l0dable_info
info
;
int
res
=
l0der_load_path
(
"blinky.elf"
,
&
info
);
if
(
res
!=
0
)
{
LOG_ERR
(
"startup"
,
"l0der failed: %d
\n
"
,
res
);
/*
* See if there's a l0dable.elf to run. If not, run pycardium.
* This is temporary until epicardium gets a l0dable API from pycardium.
*/
const
char
*
l0dable
=
"l0dable.elf"
;
if
(
f_stat
(
l0dable
,
NULL
)
==
FR_OK
)
{
LOG_INFO
(
"startup"
,
"Running %s ..."
,
l0dable
);
struct
l0dable_info
info
;
int
res
=
l0der_load_path
(
l0dable
,
&
info
);
if
(
res
!=
0
)
{
LOG_ERR
(
"startup"
,
"l0der failed: %d
\n
"
,
res
);
}
else
{
LOG_INFO
(
"startup"
,
"Starting %s on core1 ..."
,
l0dable
);
core1_start
(
info
.
isr_vector
);
}
}
else
{
LOG_INFO
(
"startup"
,
"Starting
core1 payload
..."
);
core1_start
(
info
.
isr_vector
);
LOG_INFO
(
"startup"
,
"Starting
pycardium on core1
..."
);
core1_start
(
(
void
*
)
0x10080000
);
}
LOG_INFO
(
"startup"
,
"Starting FreeRTOS ..."
);
vTaskStartScheduler
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment