chipkit32 / chipkit-cxx Goto Github PK
View Code? Open in Web Editor NEWPIC32 compiler for chipKIT
Home Page: http://chipkit.net
PIC32 compiler for chipKIT
Home Page: http://chipkit.net
We need to write some build instructions for the compiler.
Interrupt priority 7 may cause stack corruption. As a workaround, use IPL specifier IPL7AUTO rather than IPL7.
This is so that the executable permission bit can be set before archiving and it can survive the un-archiving process on the user's machine with proper permissions of folders and files.
A requirement for using the arduino-cli
is that the compiler archive must contain only one root folder. At the moment the compiler is packaged as a tar file from inside the top level folder, rather than including that top level folder.
An example of how it should be:
$ tar -ztvf pic32-tools-143-3-Linux32-image.tar.gz
drwxr-xr-x matt/matt 0 2017-04-27 21:44 pic32-tools-143/
drwxr-xr-x matt/matt 0 2017-04-27 21:44 pic32-tools-143/lib/
drwxr-xr-x matt/matt 0 2017-04-27 21:44 pic32-tools-143/lib/gcc/
drwxr-xr-x matt/matt 0 2017-04-27 21:44 pic32-tools-143/lib/gcc/pic32mx/
drwxr-xr-x matt/matt 0 2017-04-27 21:44 pic32-tools-143/lib/gcc/pic32mx/4.8.3/
drwxr-xr-x matt/matt 0 2017-04-27 21:44 pic32-tools-143/lib/gcc/pic32mx/4.8.3/micromips/
-rw-r--r-- matt/matt 795 2017-03-13 17:01 pic32-tools-143/lib/gcc/pic32mx/4.8.3/micromips/crtn.o
... etc ...
Converting one of the existing builds is easy enough:
$ mkdir pic32-tools-143
$ tar -C pic32-tools-143 -zxf pic32-tools-143-3-Linux32-image.tar.gz
$ tar -zcf pic32-tools-143-3-Linux32-image.tar.gz pic32-tools-143
And of course the file size and SHA-256 checksum will change so the JSON file will need to be updated with those new details.
A custom utility built inside the binutils tree, bin2hex ( https://github.com/chipKIT32/chipKIT-cxx/blob/master/src45x/binutils/binutils/bin2hex.c ) is missing license information inside the file.
Since binutils is GPL, and bin2hex is linked statically with part of the binutils tree, it is implied that bin2hex is also GPL, is this how ChipKit intended? Or is just the general license file for the whole tree implied?
The prefered solution would be to explicitly state the license inside the file to avoid confusion, as it is not a utility found in any official binutils distribution.
To package the compiler for Arduino 1.6.6 consumption, a checksum is needed on the compiler. While chipKIT-core can build this checksum every time the core is built, the best thing would be for the compiler build process to include the creation of this checksum.
File stdarg.h is placed in pic32mx/include/ directory, but should also be present in lib/gcc/pic32mx/4.5.1/include/.
There appears to be a flaw in the way the Arduino IDE handles files that are downloaded from the Boards Manager. It can't properly handle files that have the same name across multiple versions. For example, if you had pic32tools.zip for chipKIT-core v1.0.0 and pic32tools.zip (an updated version) for chipKIT-core v2.0.0, then if somebody tried to go from v2.0.0 to v1.0.0 they would not get the 'old' version of pic32tools.zip, because Arduino IDE thinks that it already has the file it needs, or it gives a CRC error because the file that it already has doesn't have the CRC of the other file.
So, please make sure that the binary files you upload to https://github.com/chipKIT32/chipKIT-compiler-builds have the compiler version number (v1.42.rc2 or whatever) in their actual filenames, so that they are always unique across all chipKIT-core versions.
In order to support debugging using PlatformIO, a version of GDB is needed in the tools.
It is possible to use the version of GDB provided by Imagination, but it would be good to not require the user to have to get multiple tool sets.
We should update Newlib, especially for implementations of utoa(). (cc: @KeithV)
Rebuild the compiler for 64-bit host operating systems. This is a requirement for macOS Catalina 10.15.
There are quite a number of -gdb.py files in the final output .zip files for each platform. These need to be removed. When the Arduino IDE installs the compiler and unzips the files, it chokes on these files for some reason (I don't think it's internal parsing like the leading dash?) - at least under Windows it chokes.
I tested this fix by removing all of the *.py files manually, re-zipping the compiler, uploading it to GH, and then having the Arduino IDE pull down the new zip file. It installs with no problems then.
Test with the compiler included with chipKIT-core 1.3.1 on a Digilent WiFire board with MZ EFG silicone. May not be an issue on an MX processor (not tested).
The attached chipKIT project demonstrates the issue. Running this sketch causes the program to crash when trying to access ref_global3 or ref_global4. The local references all work.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.