Skip to content

Commit 8f542f2

Browse files
authored
Merge pull request #5 from sandeepmistry/updates
Various updates
2 parents b93f57b + 1c97f56 commit 8f542f2

File tree

6 files changed

+69
-4
lines changed

6 files changed

+69
-4
lines changed

README.md

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Arduino Core for ATMEGA4809 CPU
2+
3+
This repository contains the source code and configuration files of the Arduino Core
4+
for Microchip's ATMEGA4809 processor (used on the Arduino Uno WiFi Rev2 boards).
5+
6+
## Installation on Arduino IDE
7+
8+
This core is available as a package in the Arduino IDE cores manager.
9+
Just open the "Boards Manager" and install the package called:
10+
11+
"Arduino megaAVR Boards"
12+
13+
## Support
14+
15+
There is a dedicated section of the Arduino Forum for general discussion and project assistance:
16+
17+
http://forum.arduino.cc/index.php?board=126.0
18+
19+
## Bugs or Issues
20+
21+
If you find a bug you can submit an issue here on github:
22+
23+
https://github.com/arduino/ArduinoCore-megaavr/issues
24+
25+
Before posting a new issue, please check if the same problem has been already reported by someone else
26+
to avoid duplicates.
27+
28+
## Contributions
29+
30+
Contributions are always welcome. The preferred way to receive code cotribution is by submitting a
31+
Pull Request on github.
32+
33+
## Developing
34+
35+
1. Create an `<SKETCHBOOK>/hardware/arduino` folder. Where `<SKETCHBOOK>` is the location of your
36+
Arduino sketchbook.
37+
1. Change directories: `cd <SKETCHBOOK>/hardware/arduino`
38+
1. Clone this repo: `git clone https://github.com/arduino/ArduinoCore-megaavr.git megaavr`
39+
1. Change directories: `cd megaavr/cores/arduino`
40+
1. Copy or symlink the `api` folder from the [ArduinoCore-API](https://github.com/arduino/ArduinoCore-API) repo.
41+
1. Restart the IDE
42+
43+
## License and credits
44+
45+
This core has been developed by Arduino SA in collaboration with Microchip.
46+
47+
```
48+
Copyright (c) 2018 Arduino SA. All right reserved.
49+
50+
This library is free software; you can redistribute it and/or
51+
modify it under the terms of the GNU Lesser General Public
52+
License as published by the Free Software Foundation; either
53+
version 2.1 of the License, or (at your option) any later version.
54+
55+
This library is distributed in the hope that it will be useful,
56+
but WITHOUT ANY WARRANTY; without even the implied warranty of
57+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
58+
See the GNU Lesser General Public License for more details.
59+
60+
You should have received a copy of the GNU Lesser General Public
61+
License along with this library; if not, write to the Free Software
62+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
63+
```

boards.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ uno2018.pid.0=0x2145
99

1010
uno2018.upload.tool=avrdude
1111
uno2018.upload.protocol=xplainedmini_updi
12-
uno2018.upload.maximum_size=37168
12+
uno2018.upload.maximum_size=49152
1313
uno2018.upload.maximum_data_size=6144
1414
uno2018.upload.speed=115200
1515

cores/arduino/UART.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,7 @@ void UartClass::begin(unsigned long baud, uint16_t config)
134134
// Setup port mux
135135
PORTMUX.USARTROUTEA |= _uart_mux;
136136

137-
//uint16_t baud_setting = 0;
138137
int32_t baud_setting = 0;
139-
uint8_t error = 0;
140138

141139
//Make sure global interrupts are disabled during initialization
142140
uint8_t oldSREG = SREG;

platform.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ compiler.warning_flags.more=-Wall
1818
compiler.warning_flags.all=-Wall -Wextra
1919

2020
# Default "compiler.path" is correct, change only if you want to override the initial value
21-
compiler.path={runtime.tools.avr-gcc.path}/bin/
21+
compiler.path={runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path}/bin/
2222
compiler.c.cmd=avr-gcc
2323
compiler.c.flags=-c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects
2424
compiler.c.elf.flags={compiler.warning_flags} -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections

variants/uno2018/pins_arduino.h

+2
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ static const uint8_t A5 = PIN_A5;
117117
#define NINA_GPIO0 (28u)
118118
#define NINA_RESETN (29u)
119119
#define NINA_ACK (36u)
120+
#define NINA_CTS NINA_ACK
121+
#define NINA_RTS NINA_GPIO0
120122

121123
#define SPIWIFI_SS (35u)
122124
#define SPIWIFI_ACK NINA_ACK

variants/uno2018/variant.c

+2
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ void setup_timers() {
8181
}
8282

8383
FORCE_INLINE bool isDoubleBondedActive(uint8_t pin) {
84+
(void)pin;
85+
8486
/* Check if TWI is operating on double bonded pin (Master Enable is high
8587
in both Master and Slave mode for bus error detection, so this can
8688
indicate an active state for Wire) */

0 commit comments

Comments
 (0)