Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lwc
/
compare
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Pipelines
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
507f1d08
authored
Jan 17, 2020
by
Sebastian Renner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Can compile/run gapuino examples now
parent
7e8ccbfb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
13 deletions
+20
-13
templates/gapuino/README.md
+13
-10
templates/gapuino/platformio.ini
+1
-2
templates/gapuino/src/main.cpp
+6
-1
No files found.
templates/gapuino/README.md
View file @
507f1d08
### Dirty fix for libmpfr version
`sudo ln -s /usr/lib/libmpfr.so.6 /usr/lib/libmpfr.so.4`
## Steps to getting the GAP SDK run on Linux
In general, follow this README: https://github.com/GreenWaves-Technologies/gap_sdk/blob/master/README.md
PLUS
### Fix the -Werror flag to make openocd compile
### udev rule for FTDI
```
touch 90-ftdi_gapuino.rules
echo 'ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="0666", GROUP="dialout"'> 90-ftdi_gapuino.rules
echo 'ATTRS{idVendor}=="15ba", ATTRS{idProduct}=="002b", MODE="0666", GROUP="dialout"'>> 90-ftdi_gapuino.rules
sudo mv 90-ftdi_gapuino.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && sudo udevadm trigger
```
Comment this line in gap_sdk/tools/gap8-openocd
`GCC_WARNINGS="${GCC_WARNINGS} -Werror"`
### Fix libmpfr version error
`sudo ln -s /usr/lib/libmpfr.so.6 /usr/lib/libmpfr.so.4`
templates/gapuino/platformio.ini
View file @
507f1d08
...
...
@@ -12,6 +12,5 @@
platform
=
riscv_gap
board
=
gapuino
framework
=
mbed
board_upload.boot_mode
=
jtag
_hyper
board_upload.boot_mode
=
jtag
board_upload.commands
=
reqloop ioloop start wait
templates/gapuino/src/main.cpp
View file @
507f1d08
...
...
@@ -2,12 +2,14 @@
#include "uartp.h"
#include "crypto_aead.h"
#include "mbed.h"
#include "gap_common.h"
#include "cmsis.h"
#define MAX_BYTES 100
#define CMDBUF_LEN 72
static
uint8_t
cmdbuf
[
CMDBUF_LEN
];
#define CRYPTO_BUSY GPIO_A2
3
#define CRYPTO_BUSY GPIO_A2
1
Serial
device
(
USBTX
,
USBRX
);
...
...
@@ -24,6 +26,7 @@ int res = 0;
void
setup
();
//void loop();
DigitalOut
crypto_pin
(
CRYPTO_BUSY
);
#ifdef __cplusplus
...
...
@@ -54,6 +57,7 @@ void my_assert(bool b) {
}
void
setup
()
{
PORT_SetPinMux
(
PORTA
,
35
,
uPORT_MuxGPIO
);
device
.
baud
(
115200
);
crypto_pin
=
1
;
wait
(
100
);
...
...
@@ -67,6 +71,7 @@ void setup() {
}
int
main
()
{
setup
();
int
res
;
uint16_t
len
=
uartp_recv
(
cmdbuf
,
CMDBUF_LEN
-
1
);
uint8_t
action
=
cmdbuf
[
0
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment