Skip to content
Permalink
Browse files

add coroLab board for STM32F303

  • Loading branch information...
Mikaël BRIDAY
Mikaël BRIDAY committed Mar 18, 2019
1 parent 7aa3bbc commit 8cc82c920618335b725126cbe7ab3caf837237b3
Showing with 29,833 additions and 5 deletions.
  1. +6 −0 examples/cortex/armv7em/stm32f303/coroLab/base/.gitignore
  2. +10 −0 examples/cortex/armv7em/stm32f303/coroLab/base/README.md
  3. +115 −0 examples/cortex/armv7em/stm32f303/coroLab/base/base.oil
  4. +35 −0 examples/cortex/armv7em/stm32f303/coroLab/base/blink.cpp
  5. +71 −0 examples/cortex/armv7em/stm32f303/coroLab/base/buttonTasks.cpp
  6. +6 −0 examples/cortex/armv7em/stm32f303/coroLab/base/buttonTasks.h
  7. +34 −0 examples/cortex/armv7em/stm32f303/coroLab/base/display.cpp
  8. +5 −0 examples/cortex/armv7em/stm32f303/coroLab/base/display.h
  9. +3 −0 examples/cortex/armv7em/stm32f303/coroLab/base/init.gdb
  10. +2 −2 goil/templates/code/cortex/armv7em/stm32f303/tpl_external_interrupts_c.goilTemplate
  11. +5 −3 goil/templates/config/cortex/armv7em/buildOptions.oil
  12. +50 −0 goil/templates/config/cortex/armv7em/stm32f303/coroLabBoard/config.oil
  13. +174 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/mcp23s17.cpp
  14. +102 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/mcp23s17.h
  15. +97 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/pinAccess.c
  16. +37 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/pinAccess.h
  17. +90 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/spi.c
  18. +34 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/spi.h
  19. +27 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/.travis.yml
  20. +1,963 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Adafruit_GFX.cpp
  21. +231 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Adafruit_GFX.h
  22. +398 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Adafruit_SPITFT.cpp
  23. +125 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Adafruit_SPITFT.h
  24. +112 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Adafruit_SPITFT_Macros.h
  25. +227 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeMono12pt7b.h
  26. +363 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeMono18pt7b.h
  27. +577 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeMono24pt7b.h
  28. +176 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeMono9pt7b.h
  29. +250 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeMonoBold12pt7b.h
  30. +423 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeMonoBold18pt7b.h
  31. +672 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeMonoBold24pt7b.h
  32. +189 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeMonoBold9pt7b.h
  33. +269 −0 .../cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeMonoBoldOblique12pt7b.h
  34. +460 −0 .../cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeMonoBoldOblique18pt7b.h
  35. +742 −0 .../cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeMonoBoldOblique24pt7b.h
  36. +203 −0 ...s/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeMonoBoldOblique9pt7b.h
  37. +248 −0 ...ines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeMonoOblique12pt7b.h
  38. +398 −0 ...ines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeMonoOblique18pt7b.h
  39. +643 −0 ...ines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeMonoOblique24pt7b.h
  40. +187 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeMonoOblique9pt7b.h
  41. +270 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSans12pt7b.h
  42. +452 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSans18pt7b.h
  43. +727 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSans24pt7b.h
  44. +201 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSans9pt7b.h
  45. +288 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSansBold12pt7b.h
  46. +481 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSansBold18pt7b.h
  47. +784 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSansBold24pt7b.h
  48. +208 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSansBold9pt7b.h
  49. +317 −0 .../cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSansBoldOblique12pt7b.h
  50. +545 −0 .../cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSansBoldOblique18pt7b.h
  51. +893 −0 .../cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSansBoldOblique24pt7b.h
  52. +227 −0 ...s/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSansBoldOblique9pt7b.h
  53. +302 −0 ...ines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSansOblique12pt7b.h
  54. +518 −0 ...ines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSansOblique18pt7b.h
  55. +840 −0 ...ines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSansOblique24pt7b.h
  56. +220 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSansOblique9pt7b.h
  57. +259 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSerif12pt7b.h
  58. +429 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSerif18pt7b.h
  59. +690 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSerif24pt7b.h
  60. +195 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSerif9pt7b.h
  61. +271 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSerifBold12pt7b.h
  62. +462 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSerifBold18pt7b.h
  63. +759 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSerifBold24pt7b.h
  64. +202 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSerifBold9pt7b.h
  65. +292 −0 .../cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSerifBoldItalic12pt7b.h
  66. +500 −0 .../cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSerifBoldItalic18pt7b.h
  67. +793 −0 .../cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSerifBoldItalic24pt7b.h
  68. +215 −0 ...s/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSerifBoldItalic9pt7b.h
  69. +271 −0 ...ines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSerifItalic12pt7b.h
  70. +450 −0 ...ines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSerifItalic18pt7b.h
  71. +737 −0 ...ines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSerifItalic24pt7b.h
  72. +202 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/FreeSerifItalic9pt7b.h
  73. +131 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/Org_01.h
  74. +123 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/Picopixel.h
  75. +130 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/Tiny3x3a2pt7b
  76. +474 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/Fonts/TomThumb.h
  77. +31 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/README.md
  78. +365 −0 ...ex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/examples/mock_ili9341/mock_ili9341.ino
  79. +12 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/fontconvert/Makefile
  80. +287 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/fontconvert/fontconvert.c
  81. +88 −0 ...nes/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/fontconvert/fontconvert_win.md
  82. +38 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/fontconvert/makefonts.sh
  83. +151 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/fontconvert/veraMono6.h
  84. +163 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/fontconvert/veraMono7.h
  85. +181 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/fontconvert/veraMono8.h
  86. +205 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/fontconvert/veraMono9.h
  87. +29 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/gfxfont.h
  88. +276 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/glcdfont.c
  89. +9 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/library.properties
  90. +24 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library/license.txt
  91. +29 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-ST7735-Library/.travis.yml
  92. +317 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-ST7735-Library/Adafruit_ST7735.cpp
  93. +69 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-ST7735-Library/Adafruit_ST7735.h
  94. +104 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-ST7735-Library/Adafruit_ST7789.cpp
  95. +43 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-ST7735-Library/Adafruit_ST7789.h
  96. +314 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-ST7735-Library/Adafruit_ST77xx.cpp
  97. +116 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-ST7735-Library/Adafruit_ST77xx.h
  98. +26 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-ST7735-Library/README.txt
  99. +337 −0 ...03/coroLabBoard/tft/Adafruit-ST7735-Library/examples/TFTShield18_seesaw/shieldtest/shieldtest.ino
  100. +319 −0 ...armv7em/stm32f303/coroLabBoard/tft/Adafruit-ST7735-Library/examples/graphicstest/graphicstest.ino
  101. 0 ...stm32f303/coroLabBoard/tft/Adafruit-ST7735-Library/examples/miniTFTWing/basic/.mega2560.test.skip
  102. +125 −0 ...x/armv7em/stm32f303/coroLabBoard/tft/Adafruit-ST7735-Library/examples/miniTFTWing/basic/basic.ino
  103. 0 ...03/coroLabBoard/tft/Adafruit-ST7735-Library/examples/miniTFTWing/graphicstest/.mega2560.test.skip
  104. +305 −0 ...2f303/coroLabBoard/tft/Adafruit-ST7735-Library/examples/miniTFTWing/graphicstest/graphicstest.ino
  105. +295 −0 ...armv7em/stm32f303/coroLabBoard/tft/Adafruit-ST7735-Library/examples/rotationtest/rotationtest.ino
  106. +256 −0 ...tex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-ST7735-Library/examples/shieldtest/shieldtest.ino
  107. +269 −0 ...armv7em/stm32f303/coroLabBoard/tft/Adafruit-ST7735-Library/examples/spitftbitmap/spitftbitmap.ino
  108. +9 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-ST7735-Library/library.properties
  109. +286 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/arduinoCore/Print.cpp
  110. +98 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/arduinoCore/Print.h
  111. +40 −0 machines/cortex/armv7em/stm32f303/coroLabBoard/tft/arduinoCore/Printable.h
@@ -0,0 +1,6 @@
blink
build
*_exe
*.bin
*.map
*.py
@@ -0,0 +1,10 @@
# Basic example for the Coro Lab board (based on Nucleo-32 STM32F303 with TFT display and O/I Expander)

* a blink task just assures that the system do not crash (green led)
* an ISR get the interrupt from the I/O expander and starts
* TaskB4 to TaskB7, depending on the button pressed.


`
goil --target=cortex/armv7em/stm32f303/coroLabBoard --templates=../../../../../../goil/templates/ base.oil
`
@@ -0,0 +1,115 @@
OIL_VERSION = "2.5";

IMPLEMENTATION trampoline {
/* This fix the default STACKSIZE of tasks */
TASK {
UINT32 STACKSIZE = 300 ;
} ;

/* This fix the default STACKSIZE of ISRs */
ISR {
UINT32 STACKSIZE = 200 ;
} ;
};

CPU blink {
OS config {
STATUS = EXTENDED;
PAINT_STACK = TRUE;
PAINT_REGISTERS = TRUE;

BUILD = TRUE {
TRAMPOLINE_BASE_PATH = "../../../../../..";
APP_CPPSRC = "./blink.cpp";
APP_CPPSRC = "./buttonTasks.cpp";
APP_CPPSRC = "./display.cpp";
APP_NAME = "base.elf";
CFLAGS = "-Os -fstack-usage -Wno-strict-aliasing";
LIBRARY = tft;
LIBRARY = IOExpander;
LIBRARY = IO;
LDFLAGS = "-Map=blink.map";
COMPILER = "arm-none-eabi-gcc";
CPPCOMPILER = "arm-none-eabi-g++";
ASSEMBLER = "arm-none-eabi-as";
LINKER = "arm-none-eabi-ld";
COPIER = "arm-none-eabi-objcopy";
SYSTEM = PYTHON;
};
SYSTEM_CALL = TRUE;
MEMMAP = TRUE {
COMPILER = gcc;
LINKER = gnu_ld { SCRIPT = "script.ld"; };
ASSEMBLER = gnu_as;
MEMORY_PROTECTION = FALSE;
};
};

APPMODE AppStd {};

//a periodic task that just blink LED D6
TASK blink {
PRIORITY = 1;
AUTOSTART = FALSE;
ACTIVATION = 1;
SCHEDULE = FULL;
};

ALARM blink_blink {
COUNTER = SystemCounter;
ACTION = ACTIVATETASK {
TASK = blink;
};
AUTOSTART = TRUE {
APPMODE = AppStd;
ALARMTIME = 100;
CYCLETIME = 100;
};
};

//The interrupt generated when a button is pushed.
//the isr will activate one of task TaskBx
ISR mcp23s17 { //on PA9
CATEGORY = 2;
PRIORITY = 10;
SOURCE = EXTI9_5_IRQ {
PINON9 = PA9 {
TRIGGER = FALLING;
PULL = NONE;
};
};
};

TASK TaskB4
{
PRIORITY = 2;
AUTOSTART = FALSE;
ACTIVATION = 1;
SCHEDULE = FULL;
};

TASK TaskB5
{
PRIORITY = 2;
AUTOSTART = FALSE;
ACTIVATION = 1;
SCHEDULE = FULL;
};

TASK TaskB6
{
PRIORITY = 2;
AUTOSTART = FALSE;
ACTIVATION = 1;
SCHEDULE = FULL;
};

TASK TaskB7
{
PRIORITY = 2;
AUTOSTART = FALSE;
ACTIVATION = 1;
SCHEDULE = FULL;
};
};

@@ -0,0 +1,35 @@
#include "tpl_os.h"

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "buttonTasks.h"
#include "display.h"

FUNC(int, OS_APPL_CODE) main(void)
{
pinMode(GPIOB,0,OUTPUT); //user led is PB0
setupIOExtender();
setupDisplay();
StartOS(OSDEFAULTAPPMODE);
return 0;
}

TASK(blink)
{
digitalToggle(GPIOB,0); //toggle user led.
TerminateTask();
}

/*
* * This is necessary for ST libraries
* */
FUNC(void, OS_CODE) assert_failed(uint8_t* file, uint32_t line)
{
}

extern "C" void __cxa_pure_virtual() { while (1); }

#ifdef __cplusplus
}
#endif /* __cplusplus */
@@ -0,0 +1,71 @@
#include "tpl_os.h"
#include "mcp23s17.h"

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

void setupIOExtender()
{
ioExt.begin();
//portA => leds.
for(int i=0; i<8;i++)
ioExt.pinMode(mcp23s17::PORTA,i,mcp23s17::OUTPUT);
//portB => push buttons
for(int i=0; i<8;i++)
ioExt.pinMode(mcp23s17::PORTB,i,mcp23s17::INPUT_PULLUP);
ioExt.attachInterrupt(mcp23s17::PORTB,4);
ioExt.attachInterrupt(mcp23s17::PORTB,5);
ioExt.attachInterrupt(mcp23s17::PORTB,6);
ioExt.attachInterrupt(mcp23s17::PORTB,7);
}

//ISR2 interrupt that activate tasks when a button is pressed
ISR(mcp23s17) {
//detect the button pushed,
//and activate the associated task
volatile char result = ioExt.getInterrupt();
if(result & (1<<4)) ActivateTask(TaskB4);
if(result & (1<<5)) ActivateTask(TaskB5);
if(result & (1<<6)) ActivateTask(TaskB6);
if(result & (1<<7)) ActivateTask(TaskB7);
}

volatile uint32_t nbLeds = 0;
void updateIOExtLeds()
{
ioExt.clearBits(mcp23s17::PORTA,0xff);
ioExt.setBits(mcp23s17::PORTA,(1<<nbLeds)-1);
}

TASK(TaskB4)
{
if(nbLeds < 8) nbLeds++;
updateIOExtLeds();
TerminateTask();
}

TASK(TaskB5)
{
if(nbLeds < 8) nbLeds++;
updateIOExtLeds();
TerminateTask();
}

TASK(TaskB6)
{
if(nbLeds > 0) nbLeds--;
updateIOExtLeds();
TerminateTask();
}

TASK(TaskB7)
{
if(nbLeds > 0) nbLeds--;
updateIOExtLeds();
TerminateTask();
}

#ifdef __cplusplus
}
#endif /* __cplusplus */
@@ -0,0 +1,6 @@
#ifndef __BUTTON_TASK__
#define __BUTTON_TASK__

void setupIOExtender();

#endif
@@ -0,0 +1,34 @@
#include "tpl_os.h"
#include "stm32f30x.h"
#include "stm32f30x_rcc.h"
#include "stm32f30x_gpio.h"
#include "mcp23s17.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ST7735.h"
#define PROGMEM
#define FONT_WIDTH 7
#define FONT_HEIGHT 14
#include "tft/Adafruit-GFX-Library/fontconvert/veraMono6.h"
#define FONT_NAME VeraMono6pt7b

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

Adafruit_ST7735 tft = Adafruit_ST7735();

void setupDisplay()
{
tft.initR(INITR_BLACKTAB); // initialize a ST7735S chip, black tab
tft.setFont(&FONT_NAME);
tft.fillScreen(ST7735_BLACK);
tft.setTextColor(ST7735_GREEN);
tft.setCursor(0, FONT_HEIGHT);
tft.println("Hello World! ");
tft.println("you can use this tft ");
tft.println("to debug your app...");
}

#ifdef __cplusplus
}
#endif /* __cplusplus */
@@ -0,0 +1,5 @@
#ifndef __DISPLAY_H__
#define __DISPLAY_H__

void setupDisplay() ;
#endif
@@ -0,0 +1,3 @@
tar extended-remote :4242
load
break main
@@ -146,7 +146,7 @@ before
*/%
do
%
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIO% !KEY %, ENABLE);%
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIO% !KEY %, ENABLE);%
end foreach

# Program each input pin
@@ -165,7 +165,7 @@ do
if pin::PULL == "NONE" then !"NOPULL"
else !pin::PULL
end if%;
GPIO_InitDef.GPIO_Speed = GPIO_Speed_100MHz;
GPIO_InitDef.GPIO_Speed = GPIO_Speed_10MHz;
GPIO_Init(GPIO% !pin::GPIO %, &GPIO_InitDef);%
between%
%
@@ -10,7 +10,7 @@ CPU buildOptions {
// Produce debugging information
COMMONFLAGS = "-g";
// All warnings on
COMMONFLAGS = "-Wall";
//COMMONFLAGS = "-Wall";
COMMONFLAGS = "-Wno-unused-but-set-variable"; // Except unused variables
COMMONFLAGS = "-Wmissing-field-initializers"; // Struct initialized with incorrect number of fiels
COMMONFLAGS = "-mcpu=cortex-m4"; // Compile for cortex-m4
@@ -19,11 +19,13 @@ CPU buildOptions {
COMMONFLAGS = "-mfpu=fpv4-sp-d16"; // Truly obscure option to set. Check http://stackoverflow.com/questions/19464556/how-to-link-gcc-options-to-the-arm-mcu-fpu-datasheet
COMMONFLAGS = "-nostartfiles"; // Default startfiles (crt0.c) are not used
COMMONFLAGS = "-fno-builtin"; // Do not used built in gcc functions
COMMONFLAGS = "--specs=nosys.specs"; //
CFLAGS = "--specs=nosys.specs"; //
COMMONFLAGS = "-fno-exceptions"; // No exceptions managed
COMMONFLAGS = "-nostdlib"; // Do not used implicitely the standard libraries to link
COMMONFLAGS = "-ffunction-sections"; // Each function is put in its own section. Required to deleted unused code
COMMONFLAGS = "-fdata-sections"; // Each data is put in its own section. Required to deleted unused data

//CFLAGS = "-fpermissive"; // pour les sources d'it

/*
* C++ compiler flags
@@ -52,4 +54,4 @@ CPU buildOptions {
LDFLAGS = "--no-undefined"; // Report unresolved symbol references
LDFLAGS = "--gc-sections"; // Remove unused sections. Works with -ffunction-sections and -fdata-sections, see above
};
};
};
@@ -0,0 +1,50 @@
CPU coroLabBoard{
LIBRARY spi {
PATH = "cortex/armv7em/stm32f303/coroLabBoard";
CHEADER = "spi.h";
CFILE = "spi.c";
};

LIBRARY tftDriver { // low level driver - no text
NEEDS = spi;
PATH = "cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-ST7735-Library";
CPPHEADER = "Adafruit_ST7735.h";
CPPHEADER = "Adafruit_ST77xx.h";
CPPFILE = "Adafruit_ST7735.cpp";
CPPFILE = "Adafruit_ST77xx.cpp";
};

LIBRARY coroPrint {
PATH = "cortex/armv7em/stm32f303/coroLabBoard/tft/arduinoCore";
CPPHEADER = "Print.h";
CPPHEADER = "Printable.h";
CPPFILE = "Print.cpp";
};

LIBRARY tft {
NEEDS = tftDriver;
NEEDS = coroPrint;
PATH = "cortex/armv7em/stm32f303/coroLabBoard/tft/Adafruit-GFX-Library";
CPPHEADER = "Adafruit_GFX.h";
CPPHEADER = "Adafruit_SPITFT.h";
CPPHEADER = "Adafruit_SPITFT_Macros.h";
CPPHEADER = "gfxfont.h";
CPPFILE = "Adafruit_GFX.cpp";
CPPFILE = "Adafruit_SPITFT.cpp";
};


LIBRARY IOExpander {
NEEDS = spi;
PATH = "cortex/armv7em/stm32f303/coroLabBoard";
CPPHEADER = "mcp23s17.h";
CPPFILE = "mcp23s17.cpp";
};

LIBRARY IO {
PATH = "cortex/armv7em/stm32f303/coroLabBoard";
CPPHEADER = "pinAccess.h";
CPPFILE = "pinAccess.c";
};
};

Oops, something went wrong.

0 comments on commit 8cc82c9

Please sign in to comment.
You can’t perform that action at this time.