Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic "uint8_t" not defined (Read 3010 times)
Red Baron
Member
***
Offline


Posts: 106
Location: Germany
Joined: Jul 29th, 2015
"uint8_t" not defined
Nov 12th, 2021 at 9:24am
Print Post  
Hi,

I'm using the STM32duino library with VS2019 and VM 2021.108.0. When using a STM32F4 board type 'uint8_t' is not defined. '...vsarduino.h' is very small. There are some definitions missing like '#define ___int8_t_defined'. I think, this results in some incorrect structured files in the library.

What files do I have to modify to force VM to define '___int8_t_defined' e.g.?

A Question to the project explorer: For most libraries header files of the libraries are included in folder 'Externe Abhängigkeiten' (this is German and means 'external dependencies'. The folder 'Header Files' only contains the header files that are defined directly in the project. With the STM32duino many of the library header files are shown in the folder 'Header Files' instead of 'external dependencies'. 

How can I change this?

Kind regards
Red Baron
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: "uint8_t" not defined
Reply #1 - Nov 12th, 2021 at 9:53am
Print Post  
Thanks for the report.

Could you attach the full build log, after running Build > Clean, with the Verbose and Show Build Properties enabled (shown in box at the top of this page) so we can replicate the issue accurately.

Please also provide a screenshot of the solution explorer showing the issue described, and confirm an example library this happens with.
  
Back to top
 
IP Logged
 
Red Baron
Member
***
Offline


Posts: 106
Location: Germany
Joined: Jul 29th, 2015
Re: "uint8_t" not defined
Reply #2 - Nov 13th, 2021 at 11:32am
Print Post  
I was unable to reproduce the problem with the project explorer. The problem was that I often changed the board type on the project. With a new project, the project explorer works as expected. Smiley

The 'uint8_t' problem is still there. The compiler compiles the project without an error message. So ist a problem with intellisense. I attached the build output.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Red Baron
Member
***
Offline


Posts: 106
Location: Germany
Joined: Jul 29th, 2015
Re: "uint8_t" not defined
Reply #3 - Nov 13th, 2021 at 11:35am
Print Post  
This is the content of vsarduino.h:

/* 
     Editor: https://www.visualmicro.com/
                 This file is for intellisense purpose only.
                 Visual micro (and the arduino ide) ignore this code during compilation. This code is automatically maintained by visualmicro, manual changes to this file will be overwritten
                 The contents of the _vm sub folder can be deleted prior to publishing a project
                 All non-arduino files created by visual micro and all visual studio project or solution files can be freely deleted and are not required to compile a sketch (do not delete your own code!).
                 Note: debugger breakpoints are stored in '.sln' or '.asln' files, knowledge of last uploaded breakpoints is stored in the upload.vmps.xml file. Both files are required to continue a previous debug session without needing to compile and upload again
     
     Hardware: STM32 Discovery F411E, Platform=STM32F4, Package=stm32duino
*/

#if defined(_VMICRO_INTELLISENSE)

#ifndef _VSARDUINO_H_
#define _VSARDUINO_H_
#define ERROR_LED_PIN PD14
#define ARDUINO 108010
#define VARIANT_disco_f411
#define ARDUINO_ARCH_STM32F4
#define LED_BUILTIN PD12
#define CRYSTAL_FREQ 8
#define NO_CCMRAM
#define SERIAL_USB
#define USER_ADDR_ROM 0x08000000
#define __STM32F4__
#define STM32F4
#define __cplusplus 201103L
#define __inline__
#define __asm__(x)
#define __extension__
#define __ATTR_PURE__
#define __ATTR_CONST__
#define __inline__
#define __volatile__
#define __MS_types__
#define __INT16_TYPE__
#define __INT32_TYPE__
#define __INT64_TYPE__

//#define __ICCARM__
#define __ASM
#define __INLINE
#define __builtin_va_list void
//#define _GNU_SOURCE 
#define __GNUC__ 3
//#undef  __ICCARM__
//#define __GNU__

#define __ARMCC_VERSION 400678
#define __attribute__(noinline)

#define prog_void
#define PGM_VOID_P int

            
typedef unsigned char byte;
extern "C" void __cxa_pure_virtual() {;}



#include "wprogram.h"
#include <disco_f411.h> 
#include <pins_arduino.h> 
#include <variant.h> 
#include <disco_f411.cpp> 
#undef cli
#define cli()
#include "Sketch1.ino"
#endif
#endif
  
Back to top
 
IP Logged
 
Red Baron
Member
***
Offline


Posts: 106
Location: Germany
Joined: Jul 29th, 2015
Re: "uint8_t" not defined
Reply #4 - Nov 13th, 2021 at 11:43am
Print Post  
This is the path to the library: http://dan.drown.org/stm32duino/package_STM32duino_index.json

------------------

Another problem is that in the board list there is a board that does not exist: STM32F4 Boards (Arduino_STM32). See the attached screenshot. I attached the board.txt file too.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: "uint8_t" not defined
Reply #5 - Nov 30th, 2021 at 4:33pm
Print Post  
The issue with the int8 datatypes should be resolved in the latest release, available from the top of the below board:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
  
Back to top
 
IP Logged
 
Red Baron
Member
***
Offline


Posts: 106
Location: Germany
Joined: Jul 29th, 2015
Re: "uint8_t" not defined
Reply #6 - Dec 4th, 2021 at 11:27am
Print Post  
yes, it does. Thank you!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint