Discussion:
[nuttx] Error compiling stm32f103-minimum/nsh
Daniel Pereira Carvalho danieloak@gmail.com [nuttx]
2018-01-09 16:52:51 UTC
Permalink
Hi,

The following error is shown when I try to compile stm32f103-minimum/nsh

In file included from ./stm32_boot.c:49:0:
../stm32f103_minimum.h:81:2: error: #error "HAVE_AT24 is not defined!\n"
#error "HAVE_AT24 is not defined!\n"





Daniel Pereira de Carvalho
spudarnia@yahoo.com [nuttx]
2018-01-09 17:18:39 UTC
Permalink
I removed this:

#ifndef HAVE_AT24
#error "HAVE_AT24 is not defined!\n"
#endif

I am not sure why is was there. I assume this was some debug code that Alan had in the header file to make sure that HAVE_AT24 is set. But, of course, it should not always be set!

Greg
Alan Carvalho de Assis acassis@gmail.com [nuttx]
2018-01-09 17:26:48 UTC
Permalink
Hi Greg and Daniel,

Yes, I was trying to figure-out what at24 functions are not there.

Other option could be put these lines depending on CONFIG_MTD_AT24XX :

--- a/configs/stm32f103-minimum/src/stm32f103_minimum.h
+++ b/configs/stm32f103-minimum/src/stm32f103_minimum.h
@@ -44,6 +44,8 @@
#include <nuttx/compiler.h>
#include <stdint.h>

+#ifdef CONFIG_MTD_AT24XX
+
#define HAVE_AT24 1

/* AT24 Serial EEPROM */
@@ -81,6 +83,8 @@
#error "HAVE_AT24 is not defined!\n"
#endif

+#endif /* CONFIG_MTD_AT24XX */
+
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/

BR,

Alan
Post by ***@yahoo.com [nuttx]
#ifndef HAVE_AT24
#error "HAVE_AT24 is not defined!\n"
#endif
I am not sure why is was there. I assume this was some debug code that Alan
had in the header file to make sure that HAVE_AT24 is set. But, of course,
it should not always be set!
Greg
Loading...