Coder Social home page Coder Social logo

Comments (5)

fpistm avatar fpistm commented on June 6, 2024

Hi,
seems strange as Arduino.h is added on top of the ino sketch when compiling by Arduino.
Could you share a way to reproduce.

from stm32freertos.

hreintke avatar hreintke commented on June 6, 2024

The problem comes as the libraries are compiled separate from the sketch. -> do not have Arduino.h included.

To reproduce :
New sketch, include attached library.
No further coding needed.
Compile.
RTOSTicker.zip

Edit :
It is the Arduino.h include in portmacro.h which triggers the errors

/*
 * @file    portmacro.h
 * @author  Frederic Pillon <[email protected]> for STMicroelectronics.
 * @brief   Include header of FreeRTOS portable layer file to match Arduino library format
 */

#ifndef _PORTMACRO_H_
#define _PORTMACRO_H_
#include <Arduino.h>

from stm32freertos.

fpistm avatar fpistm commented on June 6, 2024

I've reproduced and found the root cause.
The FreeRTOS.h includes the portable.h insideextern "C" { ... }.
Then portable.h includes portmacro.h which include Arduino.h.
The portmacro.h does not need all Arduino.h definition only some STM32 definition.

- #include <Arduino.h>
+ #include "stm32_def"

from stm32freertos.

hreintke avatar hreintke commented on June 6, 2024

I applied your proposed update as a local patch and can confirm it fixes the issue.

Do you want me to close the issue or keep it open until the PR is applied ?

from stm32freertos.

fpistm avatar fpistm commented on June 6, 2024

Thanks for the feedback. Issue will be closed by the PR.

from stm32freertos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.