Code Monkey home page Code Monkey logo

rogerclarkmelbourne / arduino_stm32 Goto Github PK

View Code? Open in Web Editor NEW
2.5K 238.0 1.3K 40.13 MB

Arduino STM32. Hardware files to support STM32 boards, on Arduino IDE 1.8.x including LeafLabs Maple and other generic STM32F103 boards

License: Other

C++ 27.28% C 65.63% Assembly 1.24% Makefile 0.36% Objective-C 0.04% Awk 0.01% Shell 0.19% Python 0.63% HTML 1.68% Batchfile 0.04% Processing 0.07% Java 1.96% CSS 0.04% Perl 0.04% GDB 0.02% M4 0.05% Roff 0.68% NASL 0.06% BitBake 0.01%

arduino_stm32's Introduction

Arduino STM32

Notice

This software is experimental and a work in progress. Under no circumstances should these files be used in relation to any critical system(s). Use of these files is at your own risk.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Summary:

This repo contains the "Hardware" files to support STM32 based boards on Arduino version 1.8.x (some older versions may also work) including LeafLabs Maple, and Maple mini, and other generic STM32F103 boards.

Background & Support:

Known issues

  • Use of static variables inside functions greatly increase the code size becuase additional code is needed for thread-safe handling of these statics. If this is a problem for your application, please edit platform.txt and add -fno-threadsafe-statics the compiler.cpp.flags

Additional Links & Info:

Purchase info:

Entry level boards

Bigger boards (You need to load the stm32duino bootloader)

Some suppliers have this board e.g.

arduino_stm32's People

Contributors

ag88 avatar arminjo avatar arpruss avatar aster94 avatar board707 avatar bobc avatar bubulindo avatar csnol avatar dewhisna avatar edogaldo avatar electricrcaircraftguy avatar fpistm avatar jcw avatar kiki-lamb avatar lacklustrlabs avatar lightningstalker avatar martinayotte avatar mtiutiu avatar pamribeirox avatar rogerclarkmelbourne avatar saloid avatar serasidis avatar stevstrong avatar sukkopera avatar syfre avatar synergie7 avatar testato avatar tfry-git avatar victorlamoine avatar victorpv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arduino_stm32's Issues

EEPROM can not compile

Include "EEPROM.h" into ino project, throw the error when compile:

.../flash_stm32.c:3:19: fatal error: flash.h: No such file or directory
 #include "flash.h"

openocd support?

Any chance as I don't have a ST-link?
but have RLINK and a DIY JTAG that works with OPENOCD?
I have a board with RLINK built in.

STM32Flash does not work with all OSX USB to Serial devices

Its been reported that some USB to Serial devices don't work with STM32Flash on OSX

the Errors are

Cannot handle device "/dev/cu.usbserial-A943NTHT"

http://stm32flash.googlecode.com/

Using Parser : Raw BINARY

Failed to open port: /dev/cu.usbserial-A943NTHT

At the moment its unclear what is causing this and the workaround on OSX is to use python in the upload_serial script

python $(dirname $0)/stm32loader.py -e -w -p /dev/"$1" -g -b 115200 "$4"

Maple (i.e Not Maple mini) board types don't compile

I'm not sure if this worked in BobC's original version, but Maple (i.e Not Maple mini) board types don't seem to compile

Its possible that I have changed something in one of the Maple mini files that needed to be changed in the Maple files, but the error

\usb_core.c.o: In function Standard_SetConfiguration': Arduino_STM32\STM32F1XX\variants\maple\libmaple\usb\usb_lib/usb_core.c:92: warning: undefined reference toDevice_Table'

Looks a bit more serious than could have been caused by any of my changes.

__always_inline macro conflicts with gcc definition

the macro 'always_inline' is defined in both the libmaple and also in the gcc headers. The problem is that they don't do the same thing. gcc doesn't include the inline keyword it is just the __attribute part.

Two fixes.

o change all the code in libmaple to add a an inline keyword to precede any __always_inline macro usage
or
o rename the macro so people don't aren't confused if they are used to using the one from gcc

I'd opt for the second solution as the libmaple is different than the gcc

Need to manually take newer commits from LeafLabs/libmaple into this repo

@RickKimball

I've noticed that the original leaflabs libmaple repo has some fixes that also need to be manually applied to this repo.

https://github.com/leaflabs/libmaple/commits/master

Long story, but the original code for this repo was copied by BobC from leaflabs/libmaple@f4d4fe2

He made some changes to get it to work with the 1.5.x IDE

I copied his repo when he stopped working on it, and made loads of changes to bring it roughly up to Arduino API 1.0

Which basically means, we don't have the fixes that have been added to the leaflabs repo since

leaflabs/libmaple@f4d4fe2

So there are possible fixes for some of the issues you raised
e.g.

leaflabs/libmaple@f105675

However I suspect as the code has changed quite a lot, it will take some detective work to work out the current location of some of the code in question

Sketches with global variables called index don't compile

This code,

int index = 0;
void setup() {
}
void loop() {
}

gives this error

sketch_dec30c.ino:1:5: error: 'int index' redeclared as different kind of symbol
In file included from c:\program files (x86)\arduino\hardware\tools\gcc-arm-none-eabi-4.8.3-2014q1\arm-none-eabi\include\stdlib.h:11:0,
from C:\Users\rclark\Documents\Arduino\hardware\Arduino_STM32\STM32F1XX\cores\maple/wirish.h:41,
from C:\Users\rclark\Documents\Arduino\hardware\Arduino_STM32\STM32F1XX\cores\maple/Arduino.h:30,
from sketch_dec30c.ino:1:
c:\program files (x86)\arduino\hardware\tools\gcc-arm-none-eabi-4.8.3-2014q1\arm-none-eabi\include\string.h:55:8: error: previous declaration of 'char* index(const char*, int)'
char *_EXFUN(index,(const char *, int));
^
Error compiling.

The problem appears to be associated with string.h line 55

char *_EXFUN(index,(const char *, int));

because index is defined as a function like bcopy

However the issue doesn't seem to occur on other boards e.g. the Uno

This is either because string.h is being included incorrectly or possibly because

STRICT_ANSI is not being defined for STM32 but it may be for the Uno etc

resulting binaries (.elf files) have extra stuff

The platform.txt recipe for linking uses these arguments to bring in the core.a objects:

-Wl,--whole-archive "{build.path}/{archive_file}" -Wl,--no-whole-archive

at line: https://github.com/rogerclarkmelbourne/Arduino_STM32/blob/master/STM32F1/platform.txt#L82

Is there a reason we do this? The linker sucks in the entire core.a file instead of searching and including just the routines it actually uses. This results in a 13k binary for a bare minimum sketch.

If you drop the ld directives and just use:
"{build.path}/{archive_file}"

Then you end up with a more reasonable 3k .elf

Is there a reason to force inclusion of all files in the core.a?

SPI is missing setBitOrder() and .setDataMode()

SPI is currently missing at least 2 functions which are in the Arduino 1.0.x API
Specifically setBitOrder() and .setDataMode()

It should not be hard to add them, as the code already sets these paramaters via the SPI internal Settings class

Error compiling on linux : stream.h not found

This is a case problem, the following need to include "Stream.h".

hardware/Arduino_STM32/STM32F1XX/cores/maple/HardwareSerial.h
hardware/Arduino_STM32/STM32F1XX/cores/maple/usb_serial.h

RadioHead library doesn't compile

There are various compile errors.

I added missing functions to SPIClass for attachInterrupt and detachInterrupt() but the library is using the old HardwareSPI class, which is still in the codebase.

Also the library uses the yield() function which won't link at the moment

The library will need to be changed to use SPIClass instead of HardwareSPI

I think our best option is to put a copy of the class in the libraries folder and modify it so it works for STM32, then hope we can get the custodians of the library to incorporate our changes at a later date

Arduino throws a lot of warnings to stdout (stderr) when using Arduino_STM32

I'm using Arduino 1.6.5 as a command line compiler for a Nucleo project. I noticed that quite a lot of warnings are thrown to stdout (or stderr) when running Arduino from a command line window:

Picked up JAVA_TOOL_OPTIONS:
Loading configuration...
Initializing packages...
Could not find boards.txt in /home/ctack/Programs/arduino-1.6.5/hardware/Arduino_STM32/examples. Is it pre-1.5?
Board Arduino_STM32:STM32F3:discovery_f3 doesn't define a 'build.board' preference. Auto-set to: STM32F3_DISCOVERY_F3
Warning: platform.txt from core 'STM32F3 boards' contains deprecated compiler.path={runtime.ide.path}/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/, automatically converted to compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/. Consider upgrading this core.
Could not find boards.txt in /home/ctack/Programs/arduino-1.6.5/hardware/Arduino_STM32/drivers. Is it pre-1.5?
Warning: platform.txt from core 'STM32 Boards (STM32duino.com)' contains deprecated compiler.path={runtime.ide.path}/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/, automatically converted to compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/. Consider upgrading this core.
Board Arduino_STM32:STM32F4:discovery_f407 doesn't define a 'build.board' preference. Auto-set to: STM32F4_DISCOVERY_F407
Board Arduino_STM32:STM32F4:stm32f4stamp doesn't define a 'build.board' preference. Auto-set to: STM32F4_STM32F4STAMP
Board Arduino_STM32:STM32F4:netduino2plus doesn't define a 'build.board' preference. Auto-set to: STM32F4_NETDUINO2PLUS
Warning: platform.txt from core 'STM32F4 boards' contains deprecated compiler.path={runtime.ide.path}/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/, automatically converted to compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/. Consider upgrading this core.
Could not find boards.txt in /home/ctack/Programs/arduino-1.6.5/hardware/Arduino_STM32/tools. Is it pre-1.5?
Preparing boards...
Verifying...

To make things clear: building projects for the Nucleo works just fine with Arduino_STM32 and Arduino, except for the above errors being thrown.

Arduino 1.6.5 IDE and Board manager messages

Hi,

i tried to follow installation instructions for Linux, i installed the Arduino_STM32 under the ~/Arduino/hardware directory and it seems to work (i don't tried the upload yet), but anytime when i open the Board manager, i get these messages in Arduino's debug window:

Could not find boards.txt in /home/XXXX/Arduino/hardware/Arduino_STM32/tools. Is it pre-1.5?
Could not find boards.txt in /home/XXXX/Arduino/hardware/Arduino_STM32/drivers. Is it pre-1.5?
Warning: platform.txt from core 'STM32 Boards (STM32duino.com)' contains deprecated compiler.path={runtime.ide.path}/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/, automatically converted to compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/. Consider upgrading this core.
Board Arduino_STM32:STM32F3:discovery_f3 doesn't define a 'build.board' preference. Auto-set to: STM32F3_DISCOVERY_F3
Warning: platform.txt from core 'STM32F3 boards' contains deprecated compiler.path={runtime.ide.path}/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/, automatically converted to compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/. Consider upgrading this core.
Board Arduino_STM32:STM32F4:discovery_f407 doesn't define a 'build.board' preference. Auto-set to: STM32F4_DISCOVERY_F407
Board Arduino_STM32:STM32F4:stm32f4stamp doesn't define a 'build.board' preference. Auto-set to: STM32F4_STM32F4STAMP
Board Arduino_STM32:STM32F4:netduino2plus doesn't define a 'build.board' preference. Auto-set to: STM32F4_NETDUINO2PLUS
Warning: platform.txt from core 'STM32F4 boards' contains deprecated compiler.path={runtime.ide.path}/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/, automatically converted to compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/. Consider upgrading this core.
Could not find boards.txt in /home/XXXX/Arduino/hardware/Arduino_STM32/examples. Is it pre-1.5?
Could not find boards.txt in /home/XXXX/Arduino/hardware/Arduino_STM32/tools. Is it pre-1.5?
Could not find boards.txt in /home/XXXX/Arduino/hardware/Arduino_STM32/drivers. Is it pre-1.5?
Warning: platform.txt from core 'STM32 Boards (STM32duino.com)' contains deprecated compiler.path={runtime.ide.path}/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/, automatically converted to compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/. Consider upgrading this core.
Board Arduino_STM32:STM32F3:discovery_f3 doesn't define a 'build.board' preference. Auto-set to: STM32F3_DISCOVERY_F3
Warning: platform.txt from core 'STM32F3 boards' contains deprecated compiler.path={runtime.ide.path}/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/, automatically converted to compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/. Consider upgrading this core.
Board Arduino_STM32:STM32F4:discovery_f407 doesn't define a 'build.board' preference. Auto-set to: STM32F4_DISCOVERY_F407
Board Arduino_STM32:STM32F4:stm32f4stamp doesn't define a 'build.board' preference. Auto-set to: STM32F4_STM32F4STAMP
Board Arduino_STM32:STM32F4:netduino2plus doesn't define a 'build.board' preference. Auto-set to: STM32F4_NETDUINO2PLUS
Warning: platform.txt from core 'STM32F4 boards' contains deprecated compiler.path={runtime.ide.path}/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/, automatically converted to compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/. Consider upgrading this core.
Could not find boards.txt in /home/XXXX/Arduino/hardware/Arduino_STM32/examples. Is it pre-1.5?

I don't understand this in depth, but when i take look, i can see, that the Arduino Duo code was installed under ~/.arduino15/packages/arduino/hardware/sam and the tools are in the ~/.arduino15/packages/arduino/tools, then IMO some improvements of the location are needed.

BTW: i replaced my account homedir with XXXX.

Maple mini generic - OSX

Hello,
is there a way to implement the "upload router" for OSX/(Linux), so mac user can use the generic board?

While uploading we get the problem with the upload_router.bat file :
java.io.IOException: Cannot run program "/Users/madias/Documents/Arduino/hardware/Arduino_STM32/tools/win/upload_router": error=2, No such file or directory
at java.lang.ProcessBuilder.processException(ProcessBuilder.java:478)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:457)
at java.lang.Runtime.exec(Runtime.java:593)
at java.lang.Runtime.exec(Runtime.java:466)
at processing.app.helpers.ProcessUtils.exec(Unknown Source)
at cc.arduino.packages.Uploader.executeUploadCommand(Unknown Source)
Thank you for that great project!
regards
Matthias

upload to ram?

Hi,

Would be nice to be able to upload code to RAM. Any plans to put that in too?
(and thanks! works great)

SPI doesn't compile on Microduino

SPI doesn't compile on MicroDuino variant has NSS pin definition is missing from board.h

Ian. I think you will need to put in a work-around by defining NSS to something

Perhaps you can add a pin to the end of the master pinmap for a pin on the STM32 which is not actually connected to the pins on the edge of the board.

Pin compatibility macro's won't work in global constructors

NOTE.

Any code which uses the Pin compatibility macro's in its constructor - when called globally, e.g. like the OneWire example does.

e.g.

OneWire ds(PA4); // on pin 10 (a 4.7K resistor is necessary)

void setup(void) {
Serial.begin(115200);
}

Will not work.

This is because the PIN_MAP array that contains the data used by the pin compatibility macros. for example

define digitalPinToPort(P) ( PIN_MAP[P].gpio_device )

is also effectively constructed at the same time as any global constructors e..g

extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = {

/* Arduino-like header, right connectors */

PMAP_ROW(GPIOA,   3,   NULL,  0, ADC1,    3), /* D0/PA3 */

Hence its impossible to guarantee that PIN_MAP is initialized before other globally initialized items.

Is there a plan to implement pins compatibility macros ?

Many libs using pins macros such as Adafruit_ILI9341.

Here is the pins compatibility macros needed.

#define digitalPinToPort(pin)
#define digitalPinToBitMask(pin)
#define portOutputRegister(pin)
#define portSetRegister(pin) 
#define portClearRegister(pin) 
#define portToggleRegister(pin) 
#define portInputRegister(pin)
#define portModeRegister(pin)  
#define portConfigRegister(pin) 

Files missing for Maple

Hi,
I installed Arduino 1.6.0 and the Arduino_STM32-master files like explained. When compiling programms for Maple Rev 3 to Flash I got the error
arduino-1.6.0/hardware/Arduino_STM32/STM32F1XX/cores/maple/Arduino.h:42:21: fatal error: variant.h: No such file or directory
#include "variant.h"
After copiing the files variant.h and pins_arduino.h from directory
~/arduino-1.6.0/hardware/Arduino_STM32/STM32F1XX/variants/maple_mini to
~/arduino-1.6.0/hardware/Arduino_STM32/STM32F1XX/variants/maple
it compiled without errors.

Regards
Reinhard

Linux Installation

Hello,

I tried to install your arduino STM32 IDE for my Olimex board, but I do not succeed to get the STM32 Board Selection in the Arduino IDE. This is may be I made a mistake where I copy the Arduino_STM32.

I tried to copy it under ~/Arduino/hardware/Arduino_STM3 it is not working
I tried to copy where I download the linux install link :
~/dvpt_tools/arduino/arduino_stm32/arduino-1.6

~/dvpt_tools/arduino/arduino_stm32/arduino-1.6.1$ ls
arduino Arduino_STM32 examples hardware lib libraries reference revisions.txt tools
But still it does not work.

Could you please help to figure out how I can my Linux STM32 Arduino IDE working ?

Thanks

HardwareTimer class doesn't work

Using the HardwareTimer class causes a complete crash / halt of the code

You can't even instantiate the class.

e.g.
This modified example from LeafLabs doesn't print anything.

#define LED_RATE 500000    // in microseconds; should give 0.5Hz toggles

// We'll use timer 2
HardwareTimer timer(2);

void setup() {
    // Set up the LED to blink
    pinMode(PC13, OUTPUT);

    // Pause the timer while we're configuring it
    timer.pause();

    // Set up period
    timer.setPeriod(LED_RATE); // in microseconds

    // Set up an interrupt on channel 1
    timer.setChannel1Mode(TIMER_OUTPUT_COMPARE);
    timer.setCompare(TIMER_CH1, 1);  // Interrupt 1 count after each update
    timer.attachCompare1Interrupt(handler_led);

    // Refresh the timer's count, prescale, and overflow
    timer.refresh();

    // Start the timer counting
    timer.resume();

    Serial.begin(115200);

}

void loop() {
    // Nothing! It's all in the handler_led() interrupt:
    Serial.println("HERE");
    delay(1000);
}

void handler_led(void) {
    digitalWrite(PC13,!digitalRead(PC13));
}

No upload with dev-util v0.5

Hello,
upload was not possible with dev-util version 0.5 which is in the actual Ubuntu package. After upgrade to version 0.8 upload in perpetual mode works.
Regards
Reinhard

implement timschuerewegen patch on thread #1361 (arduino forum)

I have examined the patch (line for line) and have come to the conclusion that it is a great enrichment for compatibility reasons and improvement
some examples:
include the "variants.h" into Arduino.h
include <wirish_constants.h> into wirish.h
adds some constants and typedefs (typedef uint32_t uint32;)
a complete overhaul for the SPI class, SPI now works as it should.

Can we make an untested branch?

I'd like to see the untested stuff moved to a branch by itself. Specifically I'd like to move the STM32F3 and STM32F4 stuff to that branch. I'd like to see the master branch full of known working code. The other branches would still be there but until someone is testing and supporting them they aren't part of the master branch.

What do you think?

Wire (I2C) won't run at 400kHz

Currently the fastest speed available on Wire (I2C) is around 250kHZ, as it uses bit-banged rather than hardware I2C transfers.

The speed could easily be improved if the calls to digitalWrite and digitalRead were replaced by direct access to the GPIO, and as this library is device specific, it should not be a crossplatform issue.

However care needs to be taken to ensure support for devices like the STM32F2xx and STM32F4xx as well as the current target (STM32F1xx)

White space is all over the place

I'm looking at the new commits going into the tree and everyone is using different white space settings. Could you document what white space settings should be used?

And then not accept push requests that aren't whitespace clean?

linux tools missing

missing binaries for stlink (both 32 and 64)
missing binaries for stm32flash ( both 32 and 64)
missing script serial_upload
missing script stlink_upload

Maple USB Serial.peek() crashes

When using the Maple USB Serial connection, peek() works OK for the first packet of data, however when a second packet of data, i.e one or more characters is sent.
The entire USB driver appears to crash, and even locks up the Arduino IDE if the COM port window is open.

Note. This bug only applies to USB Serial, but Hardware Serial.

digitalPinToBitMask() added but contains no functionality

This is just a note, that I added digitalPinToBitMask() to variant.h as it is required by some libraries

However whether it will be possible to implement this in a way that is compatible with all libraries is yet unclear.

I just added the file, so that libraries that use it would require less modification. But all the libraries that I have seen that use this e.g. OneWire, have a lot of #ifdef'ed blocks of code for various architecture dependent macros, so the libraries would need significant modification to work.

Ultimately the issue is that the Arduino IDE / API environment does not have a good solution to platform specific build requirements.
The main causes of the platform specific code inside the #ifdef's seems to be because digitalWrite and digitalRead etc are not very fast.

Wire library has SCL and SDA definitions but then doesn't use them.

I looked in "Wire.h" to find what pins the I2C bus would show up on. Found definitions for SCL and SDA but... nothing! Turns out there is a

//TwoWire Wire(SCL, SDA, SOFT_STANDARD);
TwoWire Wire(PB6, PB7, SOFT_STANDARD);

at the bottom of Wire.cpp which ignores the definitions of SCL and SDA.

STM32F1XX/boards.txt microduino identifier

microduino board identifier is nano. There is no issue with Arduino IDE, but nano name is shared with Arduino Nano board.

Month ago I released cuwire โ€” IDE for microcontrollers, based on Arduino 1.5 hardware specification. And command line tool can assume board vendor (like arduino or Arduino_STM32) by board name. After installation of STM32 files nano shortcut of board name is not working anymore.

Please change nano to microduino. I can make pull request for that change, but want to discuss before. Probably you have a good reason to name microduino as nano

Arduino IDE 1.6.2 is incompatible

The Arduino IDE made some major changes to the IDE file structure in version 1.6.2 which cause it to not work with this repo

At the moment I suggest that everyone stay with 1.6.1 as this is known to work.

The reason is that the IDE team have completely restructured the files that are installed, to make it modular, and 1.6.2 no longer installs the Due board and hence no longer installs the ARM compiler by default

It is possible to "Install" the Due and to get the ARM compiler, but the ARM compiler is installed in a completely different directory, hence the path specified for the compiler in platforms.txt is no longer correct.

There is a work around for this. However if I change platform.txt it breaks the repo for all previous versions :-(

I'm trying get the Arduino IDE team to add a feature so that third party boards can be added by the Boards Manager feature.
So watch this space...

stm32f4 and i2s to get codec working.

Hi and thanks for your port of Arduino to STM32f4. I've got it working and was wondering if i2s is available to get the stm32f4 discovery's audio codec working?
Thanks again.
Steve.S

Layout and implementation

The layout you suggest for installation is incorrect. It WAS correct for the older versions of Arduino. 1.6 and beyond lays things out in a much better way.
Here is how I did the installation:
under the hardware dir, made an 'ST' dir, and copied the STM* dirs under that.
Made an 'ST' dir under the root examples directory, and copied the examples there.
copied the Linux maple tools where they belong, under hardware/tools
Adjustments still need to be made to the recipes for uploading in order to work still, but this is a start.
If you like I can fork and re-arrange everything where it aught to go, and I also can include support for the STM32f429-discovery board as well.
https://github.com/texane/stlink should be used on Linux for uploading via the stlink interface.

While I realize you are basing this off of the work done on maples, I'm a bit disappointed that you didn't just use CMSIS headers in order to define everything. Arduino does exactly this for the Atmel ARM chips. It would have made everything so much easier.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.