I am trying to compile the espruino source. Everything works fine under linux.
However when I compile for the espruino board I get the following messages and compilation fails. I am using the latest version of codebench arm-2013.11-24-arm-none-eabi.
Any ideas where I am going wrong?
arthur@SZ71:~/Espruino$ ESPRUINO_1V3=1 make
CC libs/fat_sd/spi_diskio.o
CC libs/math/atanh.o
CC libs/math/cbrt.o
libs/math/cbrt.c:46:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration]
const static double CBRT2 = 1.2599210498948731647672;
^
libs/math/cbrt.c:47:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration]
const static double CBRT4 = 1.5874010519681994747517;
^
libs/math/cbrt.c:48:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration]
const static double CBRT2I = 0.79370052598409973737585;
^
libs/math/cbrt.c:49:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration]
const static double CBRT4I = 0.62996052494743658238361;
^
libs/math/atanh.c:46:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration]
const static double P[] = {
^
In file included from libs/fat_sd/spi_diskio.c:38:0:
/home/arthur/Espruino/src/jshardware.h:253:38: error: unknown type name 'uint16_t'
void jshSPIPush(IOEventFlags device, uint16_t data);
^
libs/fat_sd/spi_diskio.c: In function 'stm32_spi_rw':
libs/math/atanh.c:53:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration]
const static double Q[] = {
^
libs/math/atanh.c: In function 'atanh':
libs/fat_sd/spi_diskio.c:100:24: error: 'SD_SPI' undeclared (first use in this function)
int b = jshSPISend(SD_SPI, (unsigned char)out);
^
libs/fat_sd/spi_diskio.c:100:24: note: each undeclared identifier is reported only once for each function it appears in
libs/fat_sd/spi_diskio.c: In function 'release_spi':
libs/fat_sd/spi_diskio.c:70:38: error: 'SD_CS_PIN' undeclared (first use in this function)
[#define](https://forum.espruino.com/search/?q=%23define) DESELECT() jshPinOutput(SD_CS_PIN, 1) /* MMC CS = H */
^
libs/fat_sd/spi_diskio.c:154:2: note: in expansion of macro 'DESELECT'
DESELECT();
^
libs/fat_sd/spi_diskio.c: In function 'power_on':
libs/fat_sd/spi_diskio.c:70:38: error: 'SD_CS_PIN' undeclared (first use in this function)
[#define](https://forum.espruino.com/search/?q=%23define) DESELECT() jshPinOutput(SD_CS_PIN, 1) /* MMC CS = H */
^
libs/fat_sd/spi_diskio.c:168:2: note: in expansion of macro 'DESELECT'
DESELECT();
^
libs/math/atanh.c:151:2: warning: passing argument 2 of 'polevl' discards 'const' qualifier from pointer target type [enabled by default]
s = x + x * z * (polevl(z, P, 4) / p1evl(z, Q, 5));
^
libs/math/atanh.c:118:15: note: expected 'void *' but argument is of type 'const double *'
extern double polevl ( double x, void *P, int N );
^
libs/math/atanh.c:151:2: warning: passing argument 2 of 'p1evl' discards 'const' qualifier from pointer target type [enabled by default]
s = x + x * z * (polevl(z, P, 4) / p1evl(z, Q, 5));
^
libs/math/atanh.c:119:15: note: expected 'void *' but argument is of type 'const double *'
extern double p1evl ( double x, void *P, int N );
^
libs/fat_sd/spi_diskio.c:173:16: error: 'SD_DO_PIN' undeclared (first use in this function)
inf.pinMISO = SD_DO_PIN;
^
libs/fat_sd/spi_diskio.c:174:16: error: 'SD_DI_PIN' undeclared (first use in this function)
inf.pinMOSI = SD_DI_PIN;
^
libs/fat_sd/spi_diskio.c:175:15: error: 'SD_CLK_PIN' undeclared (first use in this function)
inf.pinSCK = SD_CLK_PIN;
^
libs/fat_sd/spi_diskio.c:177:14: error: 'SD_SPI' undeclared (first use in this function)
jshSPISetup(SD_SPI, &inf);
^
libs/fat_sd/spi_diskio.c: In function 'power_off':
libs/fat_sd/spi_diskio.c:69:38: error: 'SD_CS_PIN' undeclared (first use in this function)
[#define](https://forum.espruino.com/search/?q=%23define) SELECT() jshPinOutput(SD_CS_PIN, 0) /* MMC CS = L */
^
libs/fat_sd/spi_diskio.c:184:3: note: in expansion of macro 'SELECT'
SELECT();
^
libs/fat_sd/spi_diskio.c:192:14: error: 'SD_DO_PIN' undeclared (first use in this function)
jshPinInput(SD_DO_PIN);
^
libs/fat_sd/spi_diskio.c:193:14: error: 'SD_DI_PIN' undeclared (first use in this function)
jshPinInput(SD_DI_PIN);
^
libs/fat_sd/spi_diskio.c:194:14: error: 'SD_CLK_PIN' undeclared (first use in this function)
jshPinInput(SD_CLK_PIN);
^
libs/fat_sd/spi_diskio.c: In function 'send_cmd':
libs/fat_sd/spi_diskio.c:70:38: error: 'SD_CS_PIN' undeclared (first use in this function)
[#define](https://forum.espruino.com/search/?q=%23define) DESELECT() jshPinOutput(SD_CS_PIN, 1) /* MMC CS = H */
^
libs/fat_sd/spi_diskio.c:292:2: note: in expansion of macro 'DESELECT'
DESELECT();
^
libs/fat_sd/spi_diskio.c: In function 'disk_initialize':
libs/fat_sd/spi_diskio.c:373:8: warning: conversion to 'DSTATUS' from 'int' may alter its value [-Wconversion]
Stat &= ~STA_NOINIT; /* Clear STA_NOINIT */
^
libs/fat_sd/spi_diskio.c: In function 'disk_ioctl':
libs/fat_sd/spi_diskio.c:69:38: error: 'SD_CS_PIN' undeclared (first use in this function)
[#define](https://forum.espruino.com/search/?q=%23define) SELECT() jshPinOutput(SD_CS_PIN, 0) /* MMC CS = L */
^
libs/fat_sd/spi_diskio.c:526:4: note: in expansion of macro 'SELECT'
SELECT();
^
libs/fat_sd/spi_diskio.c:534:43: warning: conversion to 'WORD' from 'int' may alter its value [-Wconversion]
csize = csd[9] + ((WORD)csd[8] << 8) + 1;
^
libs/fat_sd/spi_diskio.c:537:71: warning: conversion to 'BYTE' from 'int' may alter its value [-Wconversion]
n = (csd[5] & 15) + ((csd[10] & 128) >> 7) + ((csd[9] & 3) << 1) + 2;
^
libs/fat_sd/spi_diskio.c:538:79: warning: conversion to 'WORD' from 'int' may alter its value [-Wconversion]
csize = (csd[8] >> 6) + ((WORD)csd[7] << 2) + ((WORD)(csd[6] & 3) << 10) + 1;
^
libs/fat_sd/spi_diskio.c:563:82: warning: conversion to 'DWORD' from 'int' may change the sign of the result [-Wsign-conversion]
*(DWORD*)buff = (((csd[10] & 63) << 1) + ((WORD)(csd[11] & 128) >> 7) + 1) << ((csd[13] >> 6) - 1);
^
libs/fat_sd/spi_diskio.c:565:58: warning: conversion to 'DWORD' from 'int' may change the sign of the result [-Wsign-conversion]
*(DWORD*)buff = ((WORD)((csd[10] & 124) >> 2) + 1) * (((csd[11] & 3) << 3) + ((csd[11] & 224) >> 5) + 1);
^
make: *** [libs/fat_sd/spi_diskio.o] Error 1
make: *** Waiting for unfinished jobs....
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I am trying to compile the espruino source. Everything works fine under linux.
However when I compile for the espruino board I get the following messages and compilation fails. I am using the latest version of codebench arm-2013.11-24-arm-none-eabi.
Any ideas where I am going wrong?