Skip to content
This repository was archived by the owner on Feb 21, 2020. It is now read-only.

Hal porting #44

Merged
merged 29 commits into from
Jun 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
cbf4e14
Clean up files
fpistm May 18, 2017
4ce6db6
Update to the STM32CubeF4 V1.16.0
fpistm May 18, 2017
bf75b7f
Update core based on HAL
fpistm May 18, 2017
a86b4f4
Add HAL wrap
fpistm May 18, 2017
0c97f2c
Add STM32 core
fpistm May 18, 2017
4ec0db2
Update Otto variant
fpistm May 18, 2017
28fff3d
Update libraries
fpistm May 18, 2017
e4c55cd
Update boards.txt and platform.txt
fpistm May 18, 2017
8825214
Fix macro
fpistm May 30, 2017
d6667c0
micros() is going backwards
fpistm May 30, 2017
1ab1a9e
Wrong definition for pins
fpistm May 30, 2017
3f1c091
Add Wire1 and Wire2 instances
cparata May 31, 2017
caa56d4
Add DFU
cparata May 31, 2017
b623a62
Add Audio library
fpistm May 18, 2017
de05463
Fix for USB serial issue
cparata Jun 1, 2017
ead4313
Remove unused .configured
fpistm Jun 2, 2017
4052dea
Fix PWM frequency
fpistm Jun 8, 2017
4df7393
In uart_debug_write() check transmit status to be sure data has been …
Jun 7, 2017
6ce0bec
Update SPI pins definition and add instance
fpistm Jun 9, 2017
cfbd4e1
Fix SPI constructors and SS pin usage modified
Jun 7, 2017
f4ebc11
Global variables removed (more secure). Exit init if pins are NC.
Jun 9, 2017
902a876
Fix SPI clock freq definition
fpistm Jun 9, 2017
6878bb9
Fix build issue
fpistm Jun 13, 2017
af2a6bb
TIMER_TONE freq is twice frequency
fpistm Jun 13, 2017
c8187d7
Use spi_transfer instead of spi_send
fpistm Jun 13, 2017
1cd3953
Fix SPI clock polarity issue
cparata Jun 15, 2017
e120c12
Fix DFU mode issue
cparata Jun 20, 2017
ac5cdd7
ARR register have to be set at Period-1.
fpistm Jun 21, 2017
98bd1ee
Review analog pins numbering and pin functions
fpistm Jun 26, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 7 additions & 5 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ star_otto.upload.altID=0
star_otto.build.mcu=cortex-m4
star_otto.build.board=STM32_STAR_OTTO
star_otto.build.f_cpu=180000000L
star_otto.build.vid=0x2A03
star_otto.build.pid=0x0058
star_otto.build.core=arduino
star_otto.build.esp_ch_uart_br=460800
star_otto.build.extra_flags=-DSTM32F469xx -DMCU_STM32F469NI -mthumb -DSTM32_HIGH_DENSITY -DESP_CH_UART -DESP_CH_UART_BR={build.esp_ch_uart_br}
star_otto.build.ldscript=link-tools/jtag.ld
star_otto.build.series=STM32F4xx
star_otto.build.variant=otto
star_otto.build.variant_system_lib=libstm32f4_otto_gcc_rel.a
star_otto.build.vect=VECT_TAB_BASE
star_otto.build.density=STM32_HIGH_DENSITY
star_otto.build.cmsis_lib_gcc=arm_cortexM4l_math
#To enable USB add '-DUSBCON'
#To enable CDC add also '-DUSBD_USE_CDC'
star_otto.build.extra_flags=-DSTM32F469xx -DUSE_USB_FS -DUSBCON -DUSBD_USE_CDC {build.usb_flags} -DESP_CH_UART -DESP_CH_UART_BR={build.esp_ch_uart_br}

##############################################################
72 changes: 58 additions & 14 deletions cores/arduino/Arduino.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,68 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

/*
* Arduino srl
* Firmware and Library Development Team
*
* Francesco Alessi (alfran) - [email protected]
* 2016 Jun 9: Edited for Arduino STAR OTTO first release
*/


#ifndef Arduino_h
#define Arduino_h
#include "WProgram.h"

#include <stdint.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <math.h>

#include "binary.h"
#include "itoa.h"

#ifdef __cplusplus
extern "C"{
#endif // __cplusplus

// Includes CMSIS
#include <chip.h>

#include "wiring_constants.h"

#define clockCyclesPerMicrosecond() ( SystemCoreClock / 1000000L )
#define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (SystemCoreClock / 1000L) )
#define microsecondsToClockCycles(a) ( (a) * (SystemCoreClock / 1000000L) )

void yield(void);

/* sketch */
extern void setup( void ) ;
extern void loop( void ) ;

/* Define attribute */
#if defined ( __CC_ARM ) /* Keil uVision 4 */
#define WEAK (__attribute__ ((weak)))
#elif defined ( __ICCARM__ ) /* IAR Ewarm 5.41+ */
#define WEAK __weak
#elif defined ( __GNUC__ ) /* GCC CS */
#define WEAK __attribute__ ((weak))
#endif

typedef uint8 boolean;
typedef uint8 byte;
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus

#include "variant.h"
#include "Tone.h"
#ifdef __cplusplus
#include "WCharacter.h"
#include "WString.h"
#include "Tone.h"
#include "WMath.h"
#include "HardwareSerial.h"
#include "wiring_pulse.h"
#include "usb_serial.h"
#endif // __cplusplus


// Include board variant
#include "pins_arduino.h"

#include "wiring.h"
#include "wiring_digital.h"
#include "wiring_analog.h"
#include "wiring_shift.h"
#include "WInterrupts.h"

#endif // Arduino_h
Empty file modified cores/arduino/Client.h
100755 → 100644
Empty file.
Loading