Skip to content

Commit 4838119

Browse files
committed
Release tag SPRESENSE_ADN_SDK_1.0.000
SPRESENSE_ADN_SDK_1.0.000 release.
1 parent 7da4c7d commit 4838119

File tree

136 files changed

+35278
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+35278
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
spresense-arduino-*.zip
2+
extract
3+
shasum.txt
4+
gcc-arm-none-eabi-5.4.1-*
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
{
2+
"packages": [
3+
{
4+
"maintainer": "Spresense Community",
5+
"help": {
6+
"online": "https://developer.sony.com/develop/spresense/"
7+
},
8+
"websiteURL": "https://developer.sony.com/develop/spresense/",
9+
"name": "SPRESENSE",
10+
"platforms": [
11+
{
12+
"category": "SPRESENSE",
13+
"name": "Spresense Reference Board",
14+
"url": "https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/v1.0.000/spresense-v1.0.000.tar.gz",
15+
"help": {
16+
"online": "https://github.com/sonydevworld/spresense-arduino-compatible/releases"
17+
},
18+
"version": "1.0.0",
19+
"architecture": "spresense",
20+
"archiveFileName": "spresense-v1.0.000.tar.gz",
21+
"boards": [
22+
{
23+
"name": "Generic Spresense Module"
24+
}
25+
],
26+
"toolsDependencies": [
27+
{
28+
"packager": "SPRESENSE",
29+
"version": "1.0.0",
30+
"name": "spresense-sdk"
31+
},
32+
{
33+
"packager": "SPRESENSE",
34+
"version": "1.0.0",
35+
"name": "spresense-tools"
36+
},
37+
{
38+
"packager": "SPRESENSE",
39+
"version": "5.4.1",
40+
"name": "gcc-arm-none-eabi"
41+
}
42+
],
43+
"size": "33653981"
44+
}
45+
],
46+
"tools": [
47+
{
48+
"version": "1.0.0",
49+
"name": "spresense-sdk",
50+
"systems": [
51+
{
52+
"url": "https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/v1.0.000/spresense-sdk-v1.0.000.tar.gz",
53+
"host": "i686-mingw32",
54+
"archiveFileName": "spresense-sdk-v1.0.000.tar.gz",
55+
"size": "7093913"
56+
},
57+
{
58+
"_comment": "Allow x64-Linux build",
59+
"url": "https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/v1.0.000/spresense-sdk-v1.0.000.tar.gz",
60+
"host": "x86_64-pc-linux-gnu",
61+
"archiveFileName": "spresense-sdk-v1.0.000.tar.gz",
62+
"size": "7093913"
63+
},
64+
{
65+
"url": "https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/v1.0.000/spresense-sdk-v1.0.000.tar.gz",
66+
"host": "i386-apple-darwin11",
67+
"archiveFileName": "spresense-sdk-v1.0.000.tar.gz",
68+
"size": "7093913"
69+
}
70+
]
71+
},
72+
{
73+
"version": "1.0.0",
74+
"name": "spresense-tools",
75+
"systems": [
76+
{
77+
"url": "https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/v1.0.000/spresense-tools-v1.0.000.tar.gz",
78+
"host": "i686-mingw32",
79+
"archiveFileName": "spresense-tools-v1.0.000.tar.gz",
80+
"size": "7093913"
81+
},
82+
{
83+
"_comment": "Allow x64-Linux build",
84+
"url": "https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/v1.0.000/spresense-tools-v1.0.000.tar.gz",
85+
"host": "x86_64-pc-linux-gnu",
86+
"archiveFileName": "spresense-tools-v1.0.000.tar.gz",
87+
"size": "7093913"
88+
}, {
89+
"url": "https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/v1.0.000/spresense-tools-v1.0.000.tar.gz",
90+
"host": "i386-apple-darwin11",
91+
"archiveFileName": "spresense-tools-v1.0.000.tar.gz",
92+
"size": "7093913"
93+
}
94+
]
95+
},
96+
{
97+
"version": "5.4.1",
98+
"name": "gcc-arm-none-eabi",
99+
"systems": [
100+
{
101+
"url": "https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/generic/gcc-arm-none-eabi-5.4.1-windows.tar.gz",
102+
"host": "i686-mingw32",
103+
"archiveFileName": "gcc-arm-none-eabi-5.4.1-windows.tar.gz",
104+
"size": "127077478"
105+
},
106+
{
107+
"_comment": "Allow x64-Linux build",
108+
"url": "https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/generic/gcc-arm-none-eabi-5.4.1-linux.tar.gz",
109+
"host": "x86_64-pc-linux-gnu",
110+
"archiveFileName": "gcc-arm-none-eabi-5.4.1-linux.tar.gz",
111+
"size": "92600244"
112+
}, {
113+
"url": "https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/generic/gcc-arm-none-eabi-5.4.1-macosx.tar.gz",
114+
"host": "i386-apple-darwin11",
115+
"archiveFileName": "gcc-arm-none-eabi-5.4.1-macosx.tar.gz",
116+
"size": "127077478"
117+
}
118+
]
119+
}
120+
]
121+
}
122+
]
123+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Arduino Core codes for Spresense reference board
2+
3+
This repository is for Spresense reference board Arduino IDE.
4+
5+
# Directory structure
6+
7+
```
8+
spresense/1.0.0
9+
|-- cores - Arduino porting codes
10+
| `-- spresense - Arduino porting codes for Spresense reference board
11+
|-- libraries - Board specific libraries
12+
|-- variants - Board configuration
13+
| `-- spresense - Board configuration for Spresense reference board
14+
|-- boards.txt - Board configuration file
15+
|-- platform.txt - Platform configuration file
16+
|-- programmers.txt - Flash tool configuration file
17+
`-- README.md - This file
18+
```
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
menu.Debug=Debug
2+
menu.UploadSpeed=UploadSpeed
3+
4+
############## Spresense BOARD ##############
5+
spresense.name=Spresense
6+
7+
spresense.upload.tool=spresense-tools
8+
spresense.upload.speed=115200
9+
spresense.upload.resetmethod=ck
10+
spresense.upload.maximum_size=786432
11+
spresense.upload.maximum_data_size=786432
12+
spresense.upload.wait_for_upload_port=true
13+
spresense.serial.disableDTR=false
14+
spresense.serial.disableRTS=true
15+
16+
spresense.bootloader.tool=spresense-tools
17+
18+
spresense.build.mcu=spresense
19+
spresense.build.f_cpu=156000000L
20+
spresense.build.board=spresense_ast
21+
spresense.build.core=spresense
22+
spresense.build.variant=spresense
23+
spresense.build.debug=
24+
spresense.build.libpath=
25+
spresense.build.stack=-Wl,--defsym,__stack=_vectors+{upload.maximum_size}
26+
27+
spresense.menu.Debug.Disabled=Disabled
28+
spresense.menu.Debug.Disabled.build.debug=
29+
spresense.menu.Debug.Disabled.build.kernel={runtime.tools.spresense-sdk.path}/spresense/release
30+
spresense.menu.Debug.Disabled.build.libpath={build.kernel}/prebuilt
31+
32+
spresense.menu.Debug.Enabled=Enabled
33+
spresense.menu.Debug.Enabled.build.debug=
34+
spresense.menu.Debug.Enabled.build.kernel={runtime.tools.spresense-sdk.path}/spresense/debug
35+
spresense.menu.Debug.Enabled.build.libpath={build.kernel}/prebuilt
36+
37+
spresense.menu.UploadSpeed.115200=115200
38+
spresense.menu.UploadSpeed.115200.upload.speed=
39+
spresense.menu.UploadSpeed.230400=230400
40+
spresense.menu.UploadSpeed.230400.upload.speed=-b 230400
41+
spresense.menu.UploadSpeed.460800=460800
42+
spresense.menu.UploadSpeed.460800.upload.speed=-b 460800
43+
spresense.menu.UploadSpeed.500000=500000
44+
spresense.menu.UploadSpeed.500000.upload.speed=-b 500000
45+
spresense.menu.UploadSpeed.576000=576000
46+
spresense.menu.UploadSpeed.576000.upload.speed=-b 576000
47+
spresense.menu.UploadSpeed.921600=921600
48+
spresense.menu.UploadSpeed.921600.upload.speed=-b 921600
49+
spresense.menu.UploadSpeed.1000000=1000000
50+
spresense.menu.UploadSpeed.1000000.upload.speed=-b 1000000
51+
spresense.menu.UploadSpeed.1152000=1152000
52+
spresense.menu.UploadSpeed.1152000.upload.speed=-b 1152000
53+
Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
/*
2+
Arduino.h - Main include file for the Sparduino SDK
3+
Copyright (C) 2018 Sony Semiconductor Solutions Corp.
4+
Copyright (c) 2017 Sony Corporation All right reserved.
5+
6+
This library is free software; you can redistribute it and/or
7+
modify it under the terms of the GNU Lesser General Public
8+
License as published by the Free Software Foundation; either
9+
version 2.1 of the License, or (at your option) any later version.
10+
11+
This library is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
Lesser General Public License for more details.
15+
16+
You should have received a copy of the GNU Lesser General Public
17+
License along with this library; if not, write to the Free Software
18+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19+
*/
20+
21+
#ifndef Arduino_h
22+
#define Arduino_h
23+
24+
#include <stdint.h>
25+
#include <stdlib.h>
26+
#include <string.h>
27+
#include <nuttx/config.h>
28+
#include <sdk/config.h>
29+
30+
// Some libraries assumes that AVR-specific definitions are
31+
// automatically included from Arduino.h... Therefore, here
32+
// includes the following dummy avr files.
33+
34+
#include "avr/pgmspace.h"
35+
#include "avr/interrupt.h"
36+
37+
#ifdef CONFIG_LIBM
38+
#include <math.h>
39+
#else
40+
#error Please enable LIBM in nuttx
41+
#endif // CONFIG_LIBM
42+
43+
#include "binary.h"
44+
//#include "itoa.h"
45+
46+
#ifdef __cplusplus
47+
extern "C"{
48+
#endif // __cplusplus
49+
50+
#include "wiring.h"
51+
#include "leds.h"
52+
53+
typedef uint8_t byte;
54+
typedef uint16_t word;
55+
56+
/* Constants */
57+
#define LOW 0x0
58+
#define HIGH 0x1
59+
#define CHANGE 0x2
60+
#define RISING 0x3
61+
#define FALLING 0x4
62+
63+
#define INPUT 0x0
64+
#define OUTPUT 0x1
65+
#define INPUT_PULLUP 0x2
66+
#define INPUT_PULLDOWN 0x3
67+
68+
#define LSBFIRST 0x0
69+
#define MSBFIRST 0x1
70+
71+
#define PI M_PI
72+
#define HALF_PI M_PI_2
73+
#define TWO_PI (PI * 2)
74+
#define DEG_TO_RAD 0.017453292519943295769236907684886
75+
#define RAD_TO_DEG 57.295779513082320876798154814105
76+
#define EULER M_E
77+
78+
/* Digital I/O */
79+
void pinMode(uint8_t, uint8_t);
80+
void digitalWrite(uint8_t, uint8_t);
81+
int digitalRead(uint8_t);
82+
83+
/* Analog I/O */
84+
void analogReference(uint8_t mode);
85+
int analogRead(uint8_t);
86+
void analogWrite(uint8_t, int);
87+
88+
/* Advanced I/O */
89+
void tone(uint8_t pin, unsigned int frequency, unsigned long duration);
90+
void noTone(uint8_t pin);
91+
void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val);
92+
uint8_t shiftIn(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder);
93+
unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout);
94+
unsigned long pulseInLong(uint8_t pin, uint8_t state, unsigned long timeout);
95+
96+
/* Time */
97+
uint64_t millis(void);
98+
uint64_t micros(void);
99+
void delay(unsigned long ms);
100+
void delayMicroseconds(unsigned int us); // can be accurate if us >= 8
101+
unsigned long clockCyclesPerMicrosecond(void);
102+
#define clockCyclesToMicroseconds(a) ( (a) / clockCyclesPerMicrosecond() )
103+
#define microsecondsToClockCycles(a) ( (a) * clockCyclesPerMicrosecond() )
104+
105+
/* Math */
106+
#define min(a, b) ((a) < (b) ? (a) : (b))
107+
#define max(a, b) ((a) > (b) ? (a) : (b))
108+
#define abs(x) ((x) > 0 ? (x) : -(x))
109+
#define round(x) ((x) >= 0 ? (long)((x) + 0.5) : (long)((x) - 0.5))
110+
#define radians(deg) ((deg) * DEG_TO_RAD)
111+
#define degrees(rad) ((rad) * RAD_TO_DEG)
112+
#define sq(x) ((x) * (x))
113+
#define constrain(amt, low, high) \
114+
((amt) < (low) ? (low) : ((amt) > (high) ? (high) : (amt)))
115+
// double sqrt(double x) // math.h
116+
// double pow(double b, double e) // math.h
117+
118+
/* Trigonometry */
119+
// double sin(double x); // math.h
120+
// double cos(double x); // math.h
121+
// double tan(double x); // math.h
122+
123+
/* Bits and Bytes*/
124+
#define lowByte(w) ((uint8_t) ((w) & 0xff))
125+
#define highByte(w) ((uint8_t) ((w) >> 8))
126+
#define bitRead(value, bit) (((value) >> (bit)) & 0x01)
127+
#define bitSet(value, bit) ((value) |= (1UL << (bit)))
128+
#define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
129+
#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit))
130+
#define bit(b) (1UL << (b))
131+
132+
/* Interrupts */
133+
void interrupts(void);
134+
void noInterrupts(void);
135+
136+
/* sketch */
137+
void init(void);
138+
void initVariant(void);
139+
int atexit(void (*func)());
140+
void setup(void);
141+
void loop(void);
142+
long map(long x, long in_min, long in_max, long out_min, long out_max);
143+
144+
#ifdef __cplusplus
145+
} // extern "C"
146+
#endif // __cplusplus
147+
148+
#ifdef __cplusplus
149+
#include "WCharacter.h" /* Characters */
150+
#include "WString.h"
151+
#endif // __cplusplus
152+
153+
// Include board variant
154+
#if 0
155+
#include "variant.h"
156+
#include "watchdog.h"
157+
#endif
158+
159+
#ifdef __cplusplus
160+
/* Advanced I/O */
161+
void tone(uint8_t pin, unsigned int frequency, unsigned long duration = 0);
162+
unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout = 1000000L);
163+
unsigned long pulseInLong(uint8_t pin, uint8_t state, unsigned long timeout = 1000000L);
164+
165+
/* WMath Prototypes */
166+
uint16_t makeWord(uint16_t w);
167+
uint16_t makeWord(byte h, byte l);
168+
#define word(...) makeWord(__VA_ARGS__)
169+
long random(long __max);
170+
long random(long __min, long __max);
171+
void randomSeed(unsigned long seed);
172+
173+
/* External Interrupts */
174+
void attachInterrupt(uint8_t interrupt, void (*isr)(void), int mode);
175+
void detachInterrupt(uint8_t interrupt);
176+
#define digitalPinToInterrupt(p) (p) /* treat pin number as the interrupt number */
177+
178+
/* Timer Interrupt */
179+
void attachTimerInterrupt(unsigned int (*isr)(void), unsigned int us);
180+
// Parameter:
181+
// isr: the function to call when the timer interrupt occurs.
182+
// This function must return the next timer period [microseconds].
183+
// If this function returns 0, the timer stops and it behaves as oneshot timer.
184+
// us: microseconds.
185+
// The maximum value is about 26 seconds and if it exceeds, an error occurs.
186+
// Note:
187+
// This can not be used at the same time with tone().
188+
void detachTimerInterrupt(void);
189+
190+
#endif // __cplusplus
191+
192+
#include <HardwareSerial.h>
193+
194+
#endif // Arduino_h

0 commit comments

Comments
 (0)