Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STM32F1 HAL: Time to add it to CI? #10998

Closed
alexxy opened this issue Jun 11, 2018 · 2 comments
Closed

STM32F1 HAL: Time to add it to CI? #10998

alexxy opened this issue Jun 11, 2018 · 2 comments

Comments

@alexxy
Copy link
Contributor

alexxy commented Jun 11, 2018

Hi!

I'm trying to build STM32F1 with default config stm32f103ret6/Configuration.h with platfromio. And it fails to build

Build Log
Compiling .pioenvs/STM32F1/src/src/module/stepper.cpp.o
In file included from Marlin/src/module/../inc/MarlinConfigPre.h:31:0,
from Marlin/src/module/../inc/MarlinConfig.h:26,
from Marlin/src/module/stepper_indirection.h:47,
from Marlin/src/module/stepper.h:46,
from Marlin/src/module/stepper.cpp:80:
Marlin/src/module/../inc/../../Configuration.h:314:2: warning: #warning temp_sensor set to 998/999 (fake) [-Wcpp]
#warning temp_sensor set to 998/999 (fake)
^~~~~~~
In file included from Marlin/src/module/../inc/MarlinConfigPre.h:31:0,
from Marlin/src/module/../inc/MarlinConfig.h:26,
from Marlin/src/module/stepper_indirection.h:47,
from Marlin/src/module/stepper.h:46,
from Marlin/src/module/stepper.cpp:80:
Marlin/src/module/../inc/../../Configuration.h:485:2: warning: #warning "disabled temperature protection" [-Wcpp]
#warning "disabled temperature protection"
^~~~~~~
Compiling .pioenvs/STM32F1/src/src/sd/Sd2Card.cpp.o
Compiling .pioenvs/STM32F1/src/src/sd/SdBaseFile.cpp.o
In file included from Marlin/src/sd/../inc/MarlinConfigPre.h:31:0,
from Marlin/src/sd/../inc/MarlinConfig.h:26,
from Marlin/src/sd/Sd2Card.cpp:31:
Marlin/src/sd/../inc/../../Configuration.h:314:2: warning: #warning temp_sensor set to 998/999 (fake) [-Wcpp]
#warning temp_sensor set to 998/999 (fake)
^~~~~~~
In file included from Marlin/src/sd/../inc/MarlinConfigPre.h:31:0,
from Marlin/src/sd/../inc/MarlinConfig.h:26,
from Marlin/src/sd/Sd2Card.cpp:31:
Marlin/src/sd/../inc/../../Configuration.h:485:2: warning: #warning "disabled temperature protection" [-Wcpp]
#warning "disabled temperature protection"
^~~~~~~
Compiling .pioenvs/STM32F1/src/src/sd/SdFatUtil.cpp.o
In file included from Marlin/src/sd/../inc/MarlinConfigPre.h:31:0,
from Marlin/src/sd/../inc/MarlinConfig.h:26,
from Marlin/src/sd/SdBaseFile.cpp:30:
Marlin/src/sd/../inc/../../Configuration.h:314:2: warning: #warning temp_sensor set to 998/999 (fake) [-Wcpp]
#warning temp_sensor set to 998/999 (fake)
^~~~~~~
In file included from Marlin/src/sd/../inc/MarlinConfigPre.h:31:0,
from Marlin/src/sd/../inc/MarlinConfig.h:26,
from Marlin/src/sd/SdBaseFile.cpp:30:
Marlin/src/sd/../inc/../../Configuration.h:485:2: warning: #warning "disabled temperature protection" [-Wcpp]
#warning "disabled temperature protection"
^~~~~~~
In file included from Marlin/src/sd/../inc/MarlinConfigPre.h:31:0,
from Marlin/src/sd/../inc/MarlinConfig.h:26,
from Marlin/src/sd/SdFatUtil.cpp:30:
Marlin/src/sd/../inc/../../Configuration.h:314:2: warning: #warning temp_sensor set to 998/999 (fake) [-Wcpp]
#warning temp_sensor set to 998/999 (fake)
^~~~~~~
In file included from Marlin/src/sd/../inc/MarlinConfigPre.h:31:0,
from Marlin/src/sd/../inc/MarlinConfig.h:26,
from Marlin/src/sd/SdFatUtil.cpp:30:
Marlin/src/sd/../inc/../../Configuration.h:485:2: warning: #warning "disabled temperature protection" [-Wcpp]
#warning "disabled temperature protection"
^~~~~~~
In file included from Marlin/src/module/../inc/MarlinConfigPre.h:28:0,
from Marlin/src/module/../inc/MarlinConfig.h:26,
from Marlin/src/module/stepper_indirection.h:47,
from Marlin/src/module/stepper.h:46,
from Marlin/src/module/stepper.cpp:80:
Marlin/src/module/../inc/../core/macros.h: In instantiation of 'constexpr decltype ((lhs + rhs)) MAX(L, R) [with L = long int; R = long unsigned int; decltype ((lhs + rhs)) = long unsigned int]':                                                                         
Marlin/src/module/stepper.h:306:14:   required from here
Marlin/src/module/../inc/../core/macros.h:221:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
return lhs > rhs ? lhs : rhs;
~~~~^~~~~
In file included from Marlin/src/module/../inc/MarlinConfig.h:28:0,
from Marlin/src/module/stepper_indirection.h:47,
from Marlin/src/module/stepper.h:46,
from Marlin/src/module/stepper.cpp:80:
Marlin/src/module/stepper.cpp: In static member function 'static void Stepper::isr()':
Marlin/src/module/../inc/../HAL/HAL_STM32F1/HAL.h:126:24: error: '__disable_irq' was not declared in this scope
#define DISABLE_ISRS() __disable_irq()
^
Marlin/src/module/stepper.cpp:1166:5: note: in expansion of macro 'DISABLE_ISRS'
DISABLE_ISRS();
^~~~~~~~~~~~
Marlin/src/module/../inc/../HAL/HAL_STM32F1/HAL.h:126:24: note: suggested alternative: 'timer_disable_irq'
#define DISABLE_ISRS() __disable_irq()
^
Marlin/src/module/stepper.cpp:1166:5: note: in expansion of macro 'DISABLE_ISRS'
DISABLE_ISRS();
^~~~~~~~~~~~
Marlin/src/module/../inc/../HAL/HAL_STM32F1/HAL.h:125:24: error: '__enable_irq' was not declared in this scope
#define ENABLE_ISRS()  __enable_irq()
^
Marlin/src/module/stepper.cpp:1184:5: note: in expansion of macro 'ENABLE_ISRS'
ENABLE_ISRS();
^~~~~~~~~~~
Marlin/src/module/../inc/../HAL/HAL_STM32F1/HAL.h:125:24: note: suggested alternative: 'adc_enable_irq'
#define ENABLE_ISRS()  __enable_irq()
^
Marlin/src/module/stepper.cpp:1184:5: note: in expansion of macro 'ENABLE_ISRS'
ENABLE_ISRS();
^~~~~~~~~~~
Marlin/src/module/../inc/../HAL/HAL_STM32F1/HAL.h:125:24: error: '__enable_irq' was not declared in this scope
#define ENABLE_ISRS()  __enable_irq()
^
Marlin/src/module/stepper.cpp:1287:3: note: in expansion of macro 'ENABLE_ISRS'
ENABLE_ISRS();
^~~~~~~~~~~
Marlin/src/module/../inc/../HAL/HAL_STM32F1/HAL.h:125:24: note: suggested alternative: 'adc_enable_irq'
#define ENABLE_ISRS()  __enable_irq()
^
Marlin/src/module/stepper.cpp:1287:3: note: in expansion of macro 'ENABLE_ISRS'
ENABLE_ISRS();
^~~~~~~~~~~
In file included from Marlin/src/module/../inc/MarlinConfigPre.h:28:0,
from Marlin/src/module/../inc/MarlinConfig.h:26,
from Marlin/src/module/stepper_indirection.h:47,
from Marlin/src/module/stepper.h:46,
from Marlin/src/module/stepper.cpp:80:
Marlin/src/module/../inc/../core/macros.h: In instantiation of 'constexpr void NOMORE(V&, N) [with V = long unsigned int; N = int]':
Marlin/src/module/stepper.cpp:1208:11:   required from here
Marlin/src/module/../inc/../core/macros.h:107:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (v > n) v = n;
~~^~~
In file included from Marlin/src/module/../inc/MarlinConfig.h:28:0,
from Marlin/src/module/stepper_indirection.h:47,
from Marlin/src/module/stepper.h:46,
from Marlin/src/module/stepper.cpp:80:
Marlin/src/module/../inc/../HAL/HAL_STM32F1/HAL.h: At global scope:
Marlin/src/module/../inc/../HAL/HAL_STM32F1/HAL.h:195:12: warning: 'int freeMemory()' defined but not used [-Wunused-function]
static int freeMemory() {
^~~~~~~~~~
*** [.pioenvs/STM32F1/src/src/module/stepper.cpp.o] Error 1
In file included from Marlin/src/sd/../inc/MarlinConfig.h:28:0,
from Marlin/src/sd/SdFatUtil.cpp:30:
Marlin/src/sd/../inc/../HAL/HAL_STM32F1/HAL.h:195:12: warning: 'int freeMemory()' defined but not used [-Wunused-function]
static int freeMemory() {
^~~~~~~~~~
In file included from Marlin/src/sd/../inc/MarlinConfig.h:28:0,
from Marlin/src/sd/Sd2Card.cpp:31:
Marlin/src/sd/../inc/../HAL/HAL_STM32F1/HAL.h:195:12: warning: 'int freeMemory()' defined but not used [-Wunused-function]
static int freeMemory() {
^~~~~~~~~~
In file included from Marlin/src/sd/../inc/MarlinConfig.h:28:0,
from Marlin/src/sd/SdBaseFile.cpp:30:
Marlin/src/sd/../inc/../HAL/HAL_STM32F1/HAL.h:195:12: warning: 'int freeMemory()' defined but not used [-Wunused-function]
static int freeMemory() {


From where comes __enable_irq/__disable_irq functions?

PS is it possible to add it to travis CI as a generic check?

@alexxy
Copy link
Contributor Author

alexxy commented Jun 11, 2018

For stm32 it should be

static __inline__ void __set_primask(uint32_t setval) \
{ __asm__ volatile ("MSR PRIMASK, %[value]\n\t""dmb\n\t""dsb\n\t""isb\n\t"::[value]"r"(setval):); \
  __asm__ volatile ("" ::: "memory");}

static __inline__ uint32_t __iSeiRetVal(void) \
{ __asm__ volatile ("CPSIE i\n\t""dmb\n\t""dsb\n\t""isb\n\t"); \
  __asm__ volatile ("" ::: "memory"); return 1; }

static __inline__ uint32_t __iCliRetVal(void) \
{ __asm__ volatile ("CPSID i\n\t""dmb\n\t""dsb\n\t""isb\n\t"); \
  __asm__ volatile ("" ::: "memory"); return 1; }

this functions

thinkyhead pushed a commit to alexxy/Marlin that referenced this issue Jun 12, 2018
Fix build after d3c0241.

Issue MarlinFirmware#10998

Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants