"error: 'GPIOA' does not name a type"

Post here first, or if you can't find a relevant section!
Post Reply
mkengineering
Posts: 12
Joined: Thu Apr 30, 2020 8:35 pm

"error: 'GPIOA' does not name a type"

Post by mkengineering »

Hello,
I'm currently working on porting the Adafruit 8 bit parallel tft library to stm32duino but I'm running into some issues when compiling.
Here is the full error:

Code: Select all

In file included from C:\Users\Mike\Documents\Arduino\libraries\TFTLCD-Library-master\Adafruit_TFTLCD.cpp:8:0:

C:\Users\Mike\Documents\Arduino\libraries\TFTLCD-Library-master/Adafruit_TFTLCD.h:58:21: error: 'GPIOB' does not name a type

 #define CNTRL_PORT  GPIOB

                     ^

C:\Users\Mike\Documents\Arduino\libraries\TFTLCD-Library-master/Adafruit_TFTLCD.h:78:20: note: in expansion of macro 'CNTRL_PORT'

 #define CS_ACTIVE  CNTRL_PORT->regs->BRR = CS_MASK

                    ^

C:\Users\Mike\Documents\Arduino\libraries\TFTLCD-Library-master\Adafruit_TFTLCD.cpp:1038:3: note: in expansion of macro 'CS_ACTIVE'

   CS_ACTIVE;

   ^

C:\Users\Mike\Documents\Arduino\libraries\TFTLCD-Library-master/Adafruit_TFTLCD.h:58:21: error: 'GPIOB' does not name a type

 #define CNTRL_PORT  GPIOB

                     ^

C:\Users\Mike\Documents\Arduino\libraries\TFTLCD-Library-master/Adafruit_TFTLCD.h:76:21: note: in expansion of macro 'CNTRL_PORT'

 #define CD_COMMAND  CNTRL_PORT->regs->BRR = CD_MASK

                     ^

C:\Users\Mike\Documents\Arduino\libraries\TFTLCD-Library-master\Adafruit_TFTLCD.cpp:1039:3: note: in expansion of macro 'CD_COMMAND'

   CD_COMMAND;

   ^

C:\Users\Mike\Documents\Arduino\libraries\TFTLCD-Library-master/Adafruit_TFTLCD.h:81:25: error: expected unqualified-id before '{' token

 #define write8inline(d) {DATA_PORT->regs->BSRR = (uint32_t)(0x00FF0000 + ((d)&0xFF)); WR_STROBE;}

                         ^

C:\Users\Mike\Documents\Arduino\libraries\TFTLCD-Library-master/Adafruit_TFTLCD.h:89:16: note: in expansion of macro 'write8inline'

 #define write8 write8inline

                ^

C:\Users\Mike\Documents\Arduino\libraries\TFTLCD-Library-master\Adafruit_TFTLCD.cpp:1040:3: note: in expansion of macro 'write8'

   write8(0x00);

   ^

exit status 1
Error compiling for board Generic STM32F103C series.
I'm using a blue pill board with roger's core, which I found here: https://github.com/rogerclarkmelbourne/Arduino_STM32
Am I missing something? Everything I have found points to GPIOB->regs->BRR = CS_MASK being correct syntax. I presume i'm missing a header file or something.

Here is a link to my code: https://github.com/mkengineering/Adafru ... ree/master

Thanks in advance for the assistance!
feluga
Posts: 64
Joined: Wed Mar 18, 2020 2:50 am

Re: "error: 'GPIOA' does not name a type"

Post by feluga »

mkengineering wrote: Thu Apr 30, 2020 8:58 pm Everything I have found points to GPIOB->regs->BRR = CS_MASK being correct syntax. I presume i'm missing a header file or something.
Check this out... it may help.

https://github.com/stevstrong/Adafruit_ ... 8bit_STM32
Post Reply

Return to “General discussion”