Commit graph

126 commits

Author SHA1 Message Date
Earle F. Philhower, III
a0060d9c3a
Add dependency file generation to build (#644)
Fixes #643
2022-06-20 07:50:28 -07:00
Earle F. Philhower, III
778cf4cb9e Update version 2022-06-14 12:34:22 -07:00
Earle F. Philhower, III
285c964c98 Update version 2022-06-14 12:05:48 -07:00
Earle F. Philhower, III
e3053f69f8
Add GCC stack protector support (#611) 2022-06-06 20:07:40 -07:00
Earle F. Philhower, III
420d669a4b
Add C++ exception option to menus (#607)
Depends on new toolchain from
https://github.com/earlephilhower/pico-quick-toolchain/pull/11

Fixes #251
2022-06-06 10:28:54 -07:00
Earle F. Philhower, III
0aa0f973aa Update version 2022-06-05 10:18:10 -07:00
Earle F. Philhower, III
fc55e1e778 Update version 2022-05-20 12:05:12 -07:00
Earle F. Philhower, III
61ac01c31b Update version 2022-05-10 08:42:22 -07:00
Earle F. Philhower, III
0c9359cddd
Fix picoprobe and pico-debug upload recipes (#577)
Need to munge the platform.txt on release.

Fixes #576
2022-05-07 18:53:02 -07:00
Earle F. Philhower, III
541e23d663 Update to major version 2.0.0 2022-04-27 12:10:55 -07:00
Earle F. Philhower, III
670957487a Update version 2022-04-22 12:55:08 -07:00
Earle F. Philhower, III
5dee051a7a Update version 2022-04-17 14:40:27 -07:00
Earle F. Philhower, III
6cb2bf7009 Update version 2022-03-17 08:42:29 -07:00
Earle F. Philhower, III
01093482e7
Add script to update version number, new header (#506)
Define ARDUINO_PICO_MAJOR/_MINOR/_REVISION for app use and update the
Platform.IO and Arduino files for a new release version.

Fixes #309
Fixes #487
2022-03-06 11:04:19 -08:00
Earle F. Philhower, III
d689165a39
Update OpenOCD for Winx32 to be x64 compatible (#485) 2022-02-13 12:54:27 -08:00
Earle F. Philhower, III
f2fd654b84 Bump to 1.11.0 2022-02-12 12:38:35 -08:00
Earle F. Philhower, III
baf925fefd Update to 1.10.0 release 2022-02-02 18:15:59 -08:00
Earle F. Philhower, III
66e4866091 Prepare for 1.9.15 2022-01-29 03:36:20 -08:00
Earle F. Philhower, III
b0365cd9ad
Update platform.txt 2022-01-29 03:32:08 -08:00
Earle F. Philhower, III
12f3505eea Update the platform release version 2022-01-05 12:16:21 -08:00
Earle F. Philhower, III
48877984b7
Remove redundant board.mcu in boards.txt, fix precompiled libs (#382)
* Remove redundant/wrong second board.mcu in boards.txt

Fixes #380

Boards.txt had the setting board.mcu twice.  The first one was correct,
while the second one wasn't and shouldn't have been there.  Remove it.

* Include fix from @rei-vilo in #381
2021-12-23 07:55:34 -08:00
Pontus Oldberg
a808f4ae6a
Adds option for setting USB max power in makeboards.py (#370) 2021-12-10 04:11:22 -08:00
Earle F. Philhower, III
b7d76bd51d
Add RTTI menu to support apps which need RTTI (#338)
By default RTTI (Run-Time Type Information) is disabled because most apps
don't need run time type info enabled.  However, certain libraries expect
to be able to query types of objects at runtime, so add a menu to enable it.
2021-10-29 08:22:27 -07:00
Mike Lynch
0c22150fdb
Add compiler Optimize option (#322) 2021-09-26 18:05:35 -07:00
Earle F. Philhower, III
8451bc21ec
Don't use no-c++-exceptions version of libstdc++ (#280)
Per #276, #277, #274 there seems to be an issue with interrupts and some
other low-level ARM operations when using the distributed libstdc++.

Use the default libstdc++ built with the toolchain, instead.

Fixes #277
Fixes #276
Fixes #274
2021-08-12 12:50:39 -07:00
Maximilian Gerhardt
61c6305aa8
Fix upload file path escaping on Windows (#254) 2021-07-19 08:46:55 -07:00
Earle F. Philhower, III
b43056cd73
Avoid issues w/other installed Windows Pythons (#253)
When a Python MSI/etc. is installed under Windows, it sets a global
PYTHONHOME and other variables.  Our shipped Python can end up using
these variables and attempt to load the wrong PYC files and fail
to run.

Avoid by using -I isolated mode in Python calls

Fixes #252
2021-07-19 08:16:22 -07:00
Earle F. Philhower, III
e4c144829c
Remove exception handling code, save RAM and FLASH (#245)
Use a libstdc++ compiled with -fno-exceptions to avoid including the
code needed to unwind C++ exceptions.

Saves ~4K RAM and ~5K flash.
2021-07-17 10:55:47 -07:00
majbthrd
47a4d9f803
Add pico-debug support (#239) 2021-07-07 12:55:03 -07:00
Earle F. Philhower, III
c539742e13
Disable ignored-qualifier warning in SDK (#238)
The Pico SDK has some magic with const pointers that generates lots of
"ignored qualifer" warnings on the more pedantic modes.  To clean the
normal builds up, disable this warning for now.  At some point a PR to
the PICO-SDK may be indicated.
2021-07-04 13:46:50 -07:00
Earle F. Philhower, III
ebd2289971
Add warning flags to build, catch missing return (#237)
Fixes #236

Compiler warning flags were completely ignored/missed in platform.txt.
Add them, as normal, and include -Werror=return-type because GCC will
produce crashing apps when a function return value is missing.
2021-07-04 12:30:59 -07:00
Earle F. Philhower, III
d67329a2b8
Rename assembly dir to boot2, only has boot2.Ss (#230) 2021-06-30 08:42:13 -07:00
Scott Smith
4509e6cf38
Fix debug level "Wire" compile error (#151)
* add missing character for debug level "Wire"

if Debug Level "Wire" is chosen, the compiler posts error
> arm-none-eabi-g++: error: DDEBUG_RP2040_WIRE: No such file or directory

Add the missing '-' to correct the issue.

* change must be made via makeboards.py

The generator script needs to be fixed and rerun. If we just update the boards.txt, changes will be lost on a rebuild.

* Update boards.txt

boards.txt as generated by revised makeboards.py

* correct spelling issue for CI tool
2021-05-19 17:46:21 -07:00
Earle F. Philhower, III
a0dac52e0e
Rationalize Adafruit Feather infra, update docs (#145)
Use same board.txt format as other Adafruit boards.
Add in quick note about the new USB stack to the docs.
2021-05-19 10:07:03 -07:00
Ha Thach
f8a2f38fe7
Port Adafruit_TinyUSB_Arduino lib (#127)
* initial tinyusb lib port

* add Adafruit_TinyUSB_Arduino as submodules

* add yield() to main loop

* sync with tinyusb lib latest

* add USB manufacturer and product

* fix typo in tinyusb lib

* sync with master

updating implementation

* Rationalize link stage command line

Make the build process less insane.

* clean up delay

* clean up platform and board

* update makeboards.py for generating usbstack menu

* update tinyusb lib to 1.0.0
2021-05-18 18:10:47 -07:00
Earle F. Philhower, III
39d1a286a8
Rationalize link stage command line (#143) 2021-05-18 02:47:57 -07:00
Khoi Hoang
b504feaa50
Add -DBOARD_NAME="{build.board}" (#136)
Add -DBOARD_NAME="{build.board}" to Compile patterns to facilitate using BOARD_NAME in sketches
2021-05-16 08:10:10 -07:00
Earle F. Philhower, III
0550fe75b2
Massively reduce generated code and RAM size (#137)
Older builds included C++ locale information in RAM/flash as well as a
bunch of exception code which can't get called since they're not enabled.

Remove them by adjusting final link command and not instantiating them
in main.cpp in the first place.

Blink went from:
> Sketch uses 215604 bytes (10%) of program storage space. Maximum is 2093056 bytes.
> Global variables use 18152 bytes (6%) of dynamic memory, leaving 243992 bytes for local variables. Maximum is 262144 bytes.

To:
> Sketch uses 56112 bytes (5%) of program storage space. Maximum is 1044480 bytes.
> Global variables use 12152 bytes (4%) of dynamic memory, leaving 249992 bytes for local variables. Maximum is 262144 bytes.

For a savings of **155KB of flash** and **6KB of RAM**
2021-05-16 02:14:58 -07:00
Earle F. Philhower, III
7f8f0cc137
Clean up platform.txt, libpico build (#128)
Add -fno-exceptions and -fno-rtti where possible.
Move insanely long strings to @files to shrink platform.txt and make
build command line shorter.
2021-05-10 17:57:24 -07:00
Earle F. Philhower, III
9e0e266b4f
Add hardware_dma include path (#101)
Fix #100
2021-04-13 15:44:27 -07:00
Earle F. Philhower, III
47c12047da Remove api from include path, add redirects
Can't have cores/rp2040/api in the include path because the Arduino API
dir has a "String.h" file.  On Windows, because it is case-insensitive
normally, this overrides the POSIX "string.h" header leading to bad
stuff.

Add manual redirect includes for commonly accessed headers in the
cores/rp2040 path instead.
2021-04-09 05:38:35 -07:00
Earle F. Philhower, III
8fed1ccf97
Add HAVE_HWSERIALX and api/dir to include path (#94)
Fixes #93
2021-04-08 05:43:51 -07:00
Earle F. Philhower, III
1eb48f724d
Add I2S output support and I2S class/library (#73)
Using the PIO-driven I2S from pico-extras, add I2S output support.

Be sure to `git submodule update --init` to get the new directories.
2021-04-02 16:21:36 -07:00
Earle F. Philhower, III
118afd0f92 Add multicore include directory to path 2021-04-02 07:36:44 -07:00
Earle F. Philhower, III
09268fe064
Add multiple boot2 options with /2 and /4 SPI div (#67)
Build all 4 different boot_stage2 objects with SPI/2 and SPI/4 options.
Add a menu to the generic board to allow selecting between them.
Use the potato/4 boot2 for the Adafruit Feather until we have a better
version verified.

Fixes #42
2021-03-31 12:42:51 -07:00
Earle F. Philhower, III
d9a4bbd95c
Add ancient AVR compatibility macros (#59) 2021-03-30 11:57:01 -07:00
Earle F. Philhower, III
1290f72e3e Add picoprobe upload support, cleanup up boards 2021-03-29 13:11:14 -07:00
Earle F. Philhower, III
b2cef8d8d6 Adafruit Feather, overclocking, flash FS shims
Add support for Adafruit Feather RP2040 (8MB).  Identified with a unique
USB PID so it displays properly once programmed one time.  Moved LED to
pin 13 (per the website docs), but have no board to test.

Add over/underclocking menus, applied at boot.  Use at your own risk, as
usual.

Add shims to allocate flash space for a filesystem (but not implemented
yet).

Add a "generic" RP2040 board
2021-03-28 10:56:53 -07:00
Earle F. Philhower, III
09ec5e0d22 Refactor USB/UART mutexes, code cleanup, CoreMutex addition
Add a CoreMutex class which implements a deadlock-safe mutex and reqork
the SerialUSB and SerialUART classes to use it to synchronize output
when in a multicore sketch.
2021-03-27 09:41:23 -07:00
Earle F. Philhower, III
c50f1ded35 Fix printf/scanf of float and doubles
Needed to fix link stage to pull in `%f` formatting support.

Fixes #32
2021-03-26 16:55:13 -07:00
Earle F. Philhower, III
6062ba901e Add project size to compile output
Thanks to @vslinuxdotnet for digging into this!  Adds the compiled
sketch RAM and flash usage to the output.

Fixes #17
2021-03-26 16:03:57 -07:00
Earle F. Philhower, III
1314aeb760 Ser F_CPU macro, remove linker align warnings 2021-03-26 14:07:25 -07:00
Earle F. Philhower, III
d51511f6c4 Add missing wiring_private.h
Forgot to `git add` a wiring file.  Fixes #11
2021-03-24 02:38:03 -07:00
Earle F. Philhower, III
40e0144195 Allow for spaces in paths of the platform/core/etc.
Properly quote all instances of file paths and runtime paths in the
platform file to ensure thathaving a username with spaces in it won't
break the compile.

Fixes #6
2021-03-23 16:48:32 -07:00
Earle F. Philhower, III
e96df9febb Clean up unused platform.txt 2021-03-21 10:37:39 -07:00
Earle F. Philhower, III
50d68f0bec Update SN in USBN device using the device ID 2021-03-21 08:55:37 -07:00
Earle F. Philhower, III
ce7ccd467b Use NEWLIB for all fcns, add porting syscalls, make ::print work
Allow ::print() to go to a serial port instead of dropping.
Will allow for full VFS/etc. with standard FILE semantics, or at least
::putc and ::getc on STDOUT/STDERR to work.
2021-03-20 21:28:23 -07:00
Earle F. Philhower, III
afb0915f9f Remove redundant -Os from command lines 2021-03-20 19:40:16 -07:00
Earle F. Philhower, III
dabc670c31 Add debug to assembly build 2021-03-20 13:38:58 -07:00
Earle F. Philhower, III
27d9ef70ab Add library build and update via CLI
pico-sdk-lib/build.sh will compile a libpico.a file from scratch using
the selected pico SDK directory.
2021-03-20 12:19:38 -07:00
Earle F. Philhower, III
c11459afac Add -g for debugging info to compile 2021-03-20 11:32:50 -07:00
Earle F. Philhower, III
6adb1a641c Initial debugging framework 2021-03-17 10:54:13 -07:00
Earle F. Philhower, III
c892443b5b Adjust directories for cleaner use w/Arduino
/system is only downloaded tools
/tools is all scripts/submodules that are part of the main core
/lib is the linker libs
2021-03-17 08:33:51 -07:00
Earle F. Philhower, III
65c81958f2 Windows upload fix, workaround pyserial quirk 2021-03-16 09:49:24 -07:00
Earle F. Philhower, III
660fe19fec Fix Windows compile/elf2uf2 errors
Windows is case-insensitive, causing "String.h" to override "string.h" in
includes.  Adjust the platform.txt appropriately.

Rebuild elf2uf2 as static to avoid startup errors on Windows boxes w/o MinGW.
2021-03-16 08:53:50 -07:00
Earle F. Philhower, III
d4427f87ce Add Servo library support, driven by the PIO SMs 2021-03-15 20:11:10 -07:00
Earle F. Philhower, III
77e54882a6 Use package4s python3 interpreter across OSes 2021-03-12 21:50:49 -08:00
Earle F. Philhower, III
129e59ab3c Add EEPROM library, using last flash sector 2021-03-12 19:38:14 -08:00
Earle F. Philhower, III
4924cd9d35 Add I2C master support library 2021-03-12 13:23:27 -08:00
Earle F. Philhower, III
b3dad2ba62 Cleanup, add licenses to all files 2021-03-05 22:09:05 -08:00
Earle F. Philhower, III
93d194b0ac Add hardware SPI support
SPI = spi0, SPI1 = spi1
2021-03-05 21:44:40 -08:00
Earle F. Philhower, III
4ac271af72 Automatic script upload working, no buttons or fiddling
Add smarts to the UF2 uploader to potentially trigger a reboot if the
device passed in is /dev/tty* or COM*.  Will cause reboot to USB
bootloader and standard UF2 upload will happen w/o any user
intervention.
2021-02-26 19:16:03 -08:00
Earle F. Philhower, III
1c9e565833 Add API dir to include path
Things like Print.h and String.h live in cores/XXX/api now, make sure
GCC includes that path by default.
2021-02-25 18:57:40 -08:00
Earle F. Philhower, III
369dea88ba Add Serial(USB) support
Serial via USB /dev/ttyACM0 now works using standalone minicom terminal
app but not via the IDE's serial monitor.
2021-02-25 17:07:42 -08:00
Earle F. Philhower, III
87bd64cf2a Add package.json and tools listing 2021-02-24 21:34:29 -08:00
Earle F. Philhower, III
44c586795b Initial commit, basic sanity
Some paths hardcoded to my custom toolchain build dir, will be updated
to a package.json tools setup soon.
https://github.com/earlephilhower/pico-quick-toolchain

Blink and Fade examples work (i.e. digitalWrite/analogWrite/delay).

Includes a discovery script which will detect RPI Picos in UF2 bootmode.
2021-02-24 20:31:13 -08:00