Hi! I am trying to port/use the following library with Baite Maple MiniBaite Maple MiniDevelopment and computing boards…fu-util: No DFU capable USB device available simonf Sun Jul 31, 2016 3:26 pm Is it a baite maple mini ? Which bootloader did you select in the IDE? Origonal or Maple Mini. Did you…View in hardware catalog ↗STM32F103C8T6STM32F103C8T6Microcontrollers and processors…e Sep 27, 2016 10:28 pm I know this is an old topic, but… I’m using blue pill board ( STM32F103C8T6 , version 3). With the current (modified) Adafruit library 0.96″ OLED display w…View in hardware catalog ↗.
/home/flo/Arduino/libraries/MBI5030_demo/MBI5030.cpp:22:20: fatal error: avr/io.h: No such file or directory#include <avr/io.h>
Replies14
Tue May 01, 2018 5:23 pm
You don’t need that line, just delete it: #include <avr/io.h>
Tue May 01, 2018 5:34 pm
I am using the arduino ide on ubuntu 16.04
I deleted #include <AVRAVRMicrocontrollers and processors…Arduino\libraries\U8glib\U8glib.cpp, C:\Program Files (x86)\Arduino\hardware\arduino\ avr \cores\arduino\HardwareSerial.h, C:\Program Files (x86)\Arduino/Blink3.ino, D:\Users\me\A…View in hardware catalog ↗/io.h> from MBI5030MBI5030Displays, touch panels and LEDsSpark Logic archive [SOLVED] Trying to use simple MBI5030 library Flub Tue May 01, 2018 5:02 pm Hi! I am trying to port/use the following library with Baite …View in hardware catalog ↗.cpp now I get this error again.
/home/flo/Arduino/libraries/MBI5030_demo/MBI5030.cpp: In constructor 'MBI5030::MBI5030(uint8_t, uint8_t, uint8_t, uint8_t)':/home/flo/Arduino/libraries/MBI5030_demo/MBI5030.cpp:34:64: error: 'portModeRegister' was not declared in this scope_spi_out_DIR = portModeRegister(digitalPinToPort(_spi_out_pin));
Tue May 01, 2018 5:53 pm
You have to change the direct register access functions like this:
Wow cool i hope it works. Where should I paste it? Or which file is this adressing?
Then i can see if i can manage to code it regarding the structure you gave.
Mh perhaps I have to think a little. as I saw from your edit: I have to somehow edit the main file in the arduino ide instead of MBI5030MBI5030Displays, touch panels and LEDsSpark Logic archive [SOLVED] Trying to use simple MBI5030 library Flub Tue May 01, 2018 5:02 pm Hi! I am trying to port/use the following library with Baite …View in hardware catalog ↗.cpp…
Forget the AVRAVRMicrocontrollers and processors…Arduino\libraries\U8glib\U8glib.cpp, C:\Program Files (x86)\Arduino\hardware\arduino\ avr \cores\arduino\HardwareSerial.h, C:\Program Files (x86)\Arduino/Blink3.ino, D:\Users\me\A…View in hardware catalog ↗ definitions, just replace the pin setting high and low definitions as I suggested.
You don’t need the DIR definitions.
Wed May 02, 2018 11:47 am
so with pin1_set you meant pin1 = HIGH and with pin1_clear you meant pin1 = LOW ?
What about pin input then?
I tried to reproduce a blink example with your code but it didnt work… Do you know why?
Thank you very much for your help !!!
I could get it working somehow now. I used gpio_set_mode(PIN_MAP[_spi_out_pin].gpio_device, PIN_MAP[_spi_out_pin].gpio_bit, GPIO_OUTPUT_PP);
Wed May 02, 2018 9:28 pm
I am not sure why you need to make internal API calls specific to the LibMaole Core.
Can you try replacing them with the normal Arduino API calls like pinmode and digitalWrite , it would be more portable, and speed would not be an issue , as the STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog ↗ runs at least 5x faster than AVRAVRMicrocontrollers and processors…Arduino\libraries\U8glib\U8glib.cpp, C:\Program Files (x86)\Arduino\hardware\arduino\ avr \cores\arduino\HardwareSerial.h, C:\Program Files (x86)\Arduino/Blink3.ino, D:\Users\me\A…View in hardware catalog ↗
Actually I doubt speed was ever an issue on AVRAVRMicrocontrollers and processors…Arduino\libraries\U8glib\U8glib.cpp, C:\Program Files (x86)\Arduino\hardware\arduino\ avr \cores\arduino\HardwareSerial.h, C:\Program Files (x86)\Arduino/Blink3.ino, D:\Users\me\A…View in hardware catalog ↗, as that function looks like a constructor
Wed May 02, 2018 9:56 pm
You should replace all these functions gpio_set_mode(PIN_MAP[_spi_out_pin].gpio_device, PIN_MAP[_spi_out_pin].gpio_bit, GPIO_OUTPUT_PP);
Wed May 02, 2018 10:49 pm
Yes
Thu May 03, 2018 5:51 am
Thanks ! I replaced the API Calls with standard Arduino code and it works. but I am wondering how to get or set the different behaviours set in gpio.h with standard arduino code?
Some of these modes are our own extension to the Arduino API
I recall discussing getting Arduino to extend their API to include this sort of thing ( possibly not specifically the pinMode)
However, the people who run Arduino don’t seem interested in moving the API forward, despite the hardware availability greatly expanding over the last 5 years, e.g with the large numbers of MCUs now suooorted by 3rd part cores.
Especially devices like the ESP8266ESP8266Microcontrollers and processors…working, on the Arduino.cc forum The ESP thing looks similar, but at the moment, www. esp8266 .com is not responding, so I’ll take a look later to see if it seems to be the same b…View in hardware catalog ↗ and the ESP32ESP32Microcontrollers and processors…ith MM here. I connected a Bluepill to a Raspberry Pi here. (same concept as ESP8266/ ESP32 ) Ray /* BlinkNcount_BP3 by m. ray burnette Turns on an LED on for one second, then off…View in hardware catalog ↗ and the TeensyTeensyDevelopment and computing boards…true ide.contributions.boards.support.urls.wiki= ide.create_platforms_from_boardsTXT. teensy =build.core vm.debug=true software=ARDUINO ssh.user.name=root ssh.user.default.passwor…View in hardware catalog ↗ etc