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

Docs #322

Closed
wants to merge 2 commits into from
Closed

Docs #322

wants to merge 2 commits into from

Conversation

OwenBrotherwood
Copy link

got rid of another problem
still getting there

$ ./build.sh
Script location C:\Users\owen\source\repos\github\OwenBrotherwood\Espruino\scripts
BOARD PICO_R1_3
HTML_FILENAME boards/PICO_R1_3.html
cp: cannot create regular file '/c/Users/owen/workspace/espruinowebsite/www/img': No such file or directory
Script location C:\Users\owen\source\repos\github\OwenBrotherwood\Espruino\scripts
BOARD ESPRUINOBOARD
HTML_FILENAME boards/ESPRUINOBOARD.html
cp: cannot stat 'boards/img/ESPRUINOBOARD.png': No such file or directory
Script location C:\Users\owen\source\repos\github\OwenBrotherwood\Espruino\scripts
BOARD ESP8266_BOARD
HTML_FILENAME boards/ESP8266_BOARD.html
cp: cannot stat 'boards/img/ESP8266_BOARD.png': No such file or directory
Script location C:\Users\owen\source\repos\github\OwenBrotherwood\Espruino\scripts
BOARD EMW3165
HTML_FILENAME boards/EMW3165.html
cp: cannot stat 'boards/img/EMW3165.png': No such file or directory
Script location C:\Users\owen\source\repos\github\OwenBrotherwood\Espruino\scripts
BOARD MICROBIT
HTML_FILENAME boards/MICROBIT.html
cp: cannot create regular file '/c/Users/owen/workspace/espruinowebsite/www/img': No such file or directory
Script location C:\Users\owen\source\repos\github\OwenBrotherwood\Espruino\scripts
BOARD ESPRUINOWIFI
HTML_FILENAME boards/ESPRUINOWIFI.html
cp: cannot create regular file '/c/Users/owen/workspace/espruinowebsite/www/img': No such file or directory
Script location C:\Users\owen\source\repos\github\OwenBrotherwood\Espruino\scripts
BOARD PUCKJS
HTML_FILENAME boards/PUCKJS.html
cp: cannot create regular file '/c/Users/owen/workspace/espruinowebsite/www/img': No such file or directory
Example File examples\distance_sensing_robot.js
Example File examples\http_file_server.js
Example File examples\http_get_image.js
Example File examples\led_vu_meter.js
Example File examples\rgb123_reaction_timer.js
Example File examples\simple_data_logger.js
Example File examples\slideshow_ili9341.js
Example File examples\temperature_display_pcd8544.js
Example File examples\temperature_graph_pcd8544.js
Example File examples\useless_box.js
Example File examples\wifi_humidity.js
Example File examples\wii_remote_control_helicopter.js
Example File examples\ws2811_led_clock.js
APPEND_PINOUT C:\Users\owen\source\repos\github\OwenBrotherwood\EspruinoDocs/html/boards/EMW3165.html
WARNING: boards\EspruinoBoard.md: Image 'boards\EspruinoBoard.md/EspruinoBoard/main.jpg' does not exist
WARNING: boards\EspruinoBoard.md: Image 'boards\EspruinoBoard.md/EspruinoBoard/annotated_1v4.jpg' does not exist
WARNING: boards\EspruinoBoard.md: Image 'boards\EspruinoBoard.md/EspruinoBoard/annotated_1v3.jpg' does not exist
WARNING: boards\EspruinoBoard.md: Image 'boards\EspruinoBoard.md/EspruinoBoard/power.png' does not exist
WARNING: APPEND_USES for 'espruinoboard' in boards\EspruinoBoard.md found nothing
APPEND_PINOUT C:\Users\owen\source\repos\github\OwenBrotherwood\EspruinoDocs/html/boards/ESPRUINOBOARD.html
APPEND_PINOUT C:\Users\owen\source\repos\github\OwenBrotherwood\EspruinoDocs/html/boards/ESP8266_BOARD.html
WARNING: boards\MicroBit.md: Image 'boards\MicroBit.md/MicroBit/board.jpg' does not exist
WARNING: APPEND_USES for 'microbit' in boards\MicroBit.md found nothing
APPEND_PINOUT C:\Users\owen\source\repos\github\OwenBrotherwood\EspruinoDocs/html/boards/MICROBIT.html
WARNING: boards\Pico.md: Image 'boards\Pico.md/Pico/angled.jpg' does not exist
WARNING: boards\Pico.md: Image 'boards\Pico.md/Pico/diagram.png' does not exist
WARNING: boards\Pico.md: Image 'boards\Pico.md/Pico/smd.jpg' does not exist
WARNING: boards\Pico.md: Image 'boards\Pico.md/Pico/footprint.png' does not exist
WARNING: boards\Pico.md: Image 'boards\Pico.md/Pico/jst.jpg' does not exist
WARNING: boards\Pico.md: Image 'boards\Pico.md/Pico/microusb.jpg' does not exist
WARNING: boards\Pico.md: Image 'boards\Pico.md/Pico/power.png' does not exist
APPEND_PINOUT C:\Users\owen\source\repos\github\OwenBrotherwood\EspruinoDocs/html/boards/PICO_R1_3.html
WARNING: boards\Puck.js.md: Image 'boards\Puck.js.md/Puck.js/board.jpg' does not exist
APPEND_PINOUT C:\Users\owen\source\repos\github\OwenBrotherwood\EspruinoDocs/html/boards/PUCKJS.html
WARNING: boards\WiFi.md: Image 'boards\WiFi.md/WiFi/angled.jpg' does not exist
WARNING: APPEND_USES for 'espruinowifi' in boards\WiFi.md found nothing
fs.js:640
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open 'C:\Users\owen\source\repos\github\OwenBrotherwood\devices\EspruinoWiFi.js'
    at Error (native)
    at Object.fs.openSync (fs.js:640:18)
    at Object.fs.readFileSync (fs.js:508:33)
    at C:\Users\owen\source\repos\github\OwenBrotherwood\EspruinoDocs\bin\build.js:415:20
    at Array.forEach (native)
    at Object.<anonymous> (C:\Users\owen\source\repos\github\OwenBrotherwood\EspruinoDocs\bin\build.js:345:15)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)

@gfwilliams
Copy link
Member

Sorry, I'm not merging this one. It works fine for me - and the path in there is meant to be relative, and you've changed it.

You've also added the print statement to before the variable was defined!

Looks to me like it's because you're running this on Windows when all the development toolchains are designed for Mac/Linux.

I'd suggest running under git shell - or ideally under a Linux VM or something, or you'll be fighting an uphill battle.

@gfwilliams gfwilliams closed this Jan 30, 2017
@OwenBrotherwood
Copy link
Author

:) I use Git Bash Shell Linux WM and anything that makes life easy.
I start up a VM and double check results (Ubuntu)

@OwenBrotherwood
Copy link
Author

I may have missed something as build.sh is being worked on.
I check if the .. has something to do with that
https://github.com/OwenBrotherwood/EspruinoDocs/blob/docs/build.sh

@gfwilliams
Copy link
Member

There must be some built-in way of getting the directory part of a filename? You could use that instead of finding the slash? Worst case just use a regex to find / and \

It's not the '.sh' file. It works fine on Linux and Mac OS.

@OwenBrotherwood
Copy link
Author

Found the problem.
As such, the easiest way to get things to work, without resorting to a VM is using Microsoft's
image

https://msdn.microsoft.com/en-us/commandline/wsl/about

image

@gfwilliams
Copy link
Member

Thanks - I'd forgotten about that. I think that'll make things a whole lot easier moving forward actually.

It might even work for compilation

@OwenBrotherwood
Copy link
Author

OwenBrotherwood commented Jan 31, 2017

tested compilation for hex last night: I will test that the result actually runs on the nRF52 today.
So far, it is only the webide that does not give a good result: I work on that.
As such, moving forward to make things easier is an aim: I just put some of my own projects on hold in order to get "this" moving forward so that in the end, I am finished earlier than if I did not make an effort

The link below is just a quicky to show anybody how to until I make an advertisement free github version for espruino where the context is how to easy espurino on the os one has as a workstation.

http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/

@OwenBrotherwood
Copy link
Author

OwenBrotherwood commented Jan 31, 2017

telnet
NOTE: no access to USB or bluetooth in the sandbox microsoft has made

image

@OwenBrotherwood
Copy link
Author

image

root@DESKTOP-O5H58VV:/mnt/c/source/repos/github/espruino/Espruino# NRF52832DK=1 USE_FILESYSTEM=1 RELEASE=1 make
Generating platform configs
Generating pin info
Generating JS wrappers
WRAPPERSOURCES = src/jswrap_array.c src/jswrap_arraybuffer.c src/jswrap_date.c src/jswrap_error.c src/jswrap_espruino.c src/jswrap_flash.c src/jswrap_functions.c src/jswrap_interactive.c src/jswrap_io.c src/jswrap_json.c src/jswrap_modules.c src/jswrap_pin.c src/jswrap_number.c src/jswrap_object.c src/jswrap_onewire.c src/jswrap_pipe.c src/jswrap_process.c src/jswrap_promise.c src/jswrap_serial.c src/jswrap_spi_i2c.c src/jswrap_stream.c src/jswrap_string.c src/jswrap_waveform.c libs/filesystem/jswrap_fs.c libs/filesystem/jswrap_file.c libs/math/jswrap_math.c libs/graphics/jswrap_graphics.c libs/network/jswrap_net.c libs/network/http/jswrap_http.c libs/network/js/jswrap_jsnetwork.c libs/network/cc3000/jswrap_cc3000.c libs/bluetooth/jswrap_bluetooth.c
DEFINES = -DGIT_COMMIT=9a2398fb8b83099708500b20ea3296137318df60 -DNO_ASSERT -DRELEASE -DBUILDNUMBER="33" -DBOARD_PCA10040 -DPCA10040 -DUSE_DEBUGGER -DUSE_TAB_COMPLETE -DUSE_HEATSHRINK -DUSE_FILESYSTEM -DUSE_MATH -DUSE_GRAPHICS -DUSE_NET -DUSE_CC3000 -DSEND_NON_BLOCKING -DSWI_DISABLE0 -DSOFTDEVICE_PRESENT -DNRF52 -DCONFIG_GPIO_AS_PINRESET -DS132 -DBLE_STACK_SUPPORT_REQD -DNRF_SD_BLE_API_VERSION=3 -DUSE_NFC -DNFC_HAL_ENABLED=1 -DBLUETOOTH -DNRF52832DK -DNRF52832 -DARM -DLINK_TIME_OPTIMISATION -DEMBEDDED
CC libs/compression/heatshrink/heatshrink_encoder.o
CC libs/compression/heatshrink/heatshrink_decoder.o
CC libs/compression/compress_heatshrink.o
CC libs/filesystem/fat_sd/fattime.o
CC libs/filesystem/fat_sd/ff.o
CC libs/filesystem/fat_sd/option/unicode.o
CC libs/filesystem/fat_sd/spi_diskio.o
CC libs/graphics/bitmap_font_4x6.o
libs/compression/compress_heatshrink.c: In function 'heatshrink_encode':
libs/compression/compress_heatshrink.c:35:10: warning: unused variable 'ok' [-Wunused-variable]
     bool ok = heatshrink_encoder_sink(&hse, &data[sunk], dataLen - sunk, &count) >= 0;
          ^~
libs/compression/compress_heatshrink.c: In function 'heatshrink_decode':
libs/compression/compress_heatshrink.c:76:10: warning: unused variable 'ok' [-Wunused-variable]
     bool ok = heatshrink_decoder_sink(&hsd, inBuf, inBufCount, &count) >= 0;
          ^~
CC libs/graphics/graphics.o
CC libs/graphics/lcd_arraybuffer.o
CC libs/graphics/lcd_js.o
CC libs/network/network.o
CC libs/network/socketserver.o
CC libs/network/socketerrors.o
CC libs/network/js/network_js.o
CC libs/network/cc3000/network_cc3000.o
CC libs/network/cc3000/board_spi.o
libs/network/socketserver.c: In function 'clientRequestConnect':
libs/network/socketserver.c:812:14: warning: unused variable 'socketType' [-Wunused-variable]
   SocketType socketType = socketGetType(httpClientReqVar);
              ^~~~~~~~~~
CC libs/network/cc3000/cc3000_common.o
CC libs/network/cc3000/evnt_handler.o
CC libs/network/cc3000/hci.o
In file included from libs/network/cc3000/network_cc3000.c:27:0:
/mnt/c/source/repos/github/espruino/Espruino/libs/network/cc3000/socket.h:418:45: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
                   fd_set *exceptsds, struct timeval *timeout);
                                             ^~~~~~~
libs/network/cc3000/network_cc3000.c: In function 'net_cc3000_createsocket':
libs/network/cc3000/network_cc3000.c:102:28: warning: passing argument 2 of 'connect' from incompatible pointer type [-Wincompatible-pointer-types]
     int res = connect(sckt,(struct sockaddr *)&sin, sizeof(sockaddr_in) );
                            ^
In file included from libs/network/cc3000/network_cc3000.c:27:0:
/mnt/c/source/repos/github/espruino/Espruino/libs/network/cc3000/socket.h:378:13: note: expected 'const sockaddr * {aka const struct _sockaddr_t *}' but argument is of type 'struct sockaddr *'
 extern long connect(long sd, const sockaddr *addr, long addrlen);
             ^~~~~~~
libs/network/cc3000/network_cc3000.c:132:23: warning: passing argument 2 of 'bind' from incompatible pointer type [-Wincompatible-pointer-types]
     nret = bind(sckt, (struct sockaddr*)&serverInfo, sizeof(serverInfo));
                       ^
In file included from libs/network/cc3000/network_cc3000.c:27:0:
/mnt/c/source/repos/github/espruino/Espruino/libs/network/cc3000/socket.h:301:13: note: expected 'const sockaddr * {aka const struct _sockaddr_t *}' but argument is of type 'struct sockaddr *'
 extern long bind(long sd, const sockaddr *addr, long addrlen);
             ^~~~
libs/network/cc3000/network_cc3000.c: In function 'net_cc3000_recv':
libs/network/cc3000/network_cc3000.c:176:38: warning: passing argument 5 of 'select' from incompatible pointer type [-Wincompatible-pointer-types]
   int n = select(sckt+1,&s,NULL,NULL,&timeout);
                                      ^
In file included from libs/network/cc3000/network_cc3000.c:27:0:
/mnt/c/source/repos/github/espruino/Espruino/libs/network/cc3000/socket.h:417:12: note: expected 'struct timeval *' but argument is of type 'struct timeval *'
 extern int select(long nfds, fd_set *readsds, fd_set *writesds,
            ^~~~~~
libs/network/cc3000/network_cc3000.c:187:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       num>len) // Yes, this really does happen
          ^
libs/network/cc3000/network_cc3000.c: In function 'net_cc3000_send':
libs/network/cc3000/network_cc3000.c:204:43: warning: passing argument 5 of 'select' from incompatible pointer type [-Wincompatible-pointer-types]
   int n = select(sckt+1, 0, &writefds, 0, &time);
                                           ^
In file included from libs/network/cc3000/network_cc3000.c:27:0:
/mnt/c/source/repos/github/espruino/Espruino/libs/network/cc3000/socket.h:417:12: note: expected 'struct timeval *' but argument is of type 'struct timeval *'
 extern int select(long nfds, fd_set *readsds, fd_set *writesds,
            ^~~~~~
libs/network/cc3000/network_cc3000.c:210:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (n>len) return -1;
          ^
CC libs/network/cc3000/netapp.o
CC libs/network/cc3000/nvmem.o
CC libs/network/cc3000/security.o
CC libs/network/cc3000/socket.o
CC libs/network/cc3000/wlan.o
CC targets/nrf5x/main.o
CC targets/nrf5x/jshardware.o
CC targets/nrf5x/bluetooth.o
In file included from libs/network/cc3000/hci.h:38:0,
                 from libs/network/cc3000/socket.c:44:
libs/network/cc3000/socket.c: In function 'setsockopt':
libs/network/cc3000/cc3000_common.h:334:71: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define ARRAY_TO_STREAM(p, a, l)  {register short _i; for (_i = 0; _i < l; _i++) *(p)++ = ((unsigned char *) a)[_i];}
                                                                       ^
libs/network/cc3000/socket.c:748:2: note: in expansion of macro 'ARRAY_TO_STREAM'
  ARRAY_TO_STREAM(args, ((unsigned char *)optval), optlen);
  ^~~~~~~~~~~~~~~
In file included from libs/network/cc3000/wlan.h:38:0,
                 from libs/network/cc3000/wlan.c:42:
libs/network/cc3000/wlan.c: In function 'wlan_add_profile':
libs/network/cc3000/cc3000_common.h:334:71: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define ARRAY_TO_STREAM(p, a, l)  {register short _i; for (_i = 0; _i < l; _i++) *(p)++ = ((unsigned char *) a)[_i];}
                                                                       ^
libs/network/cc3000/wlan.c:628:4: note: in expansion of macro 'ARRAY_TO_STREAM'
    ARRAY_TO_STREAM(args, ucSsid, ulSsidLen);
    ^~~~~~~~~~~~~~~
libs/network/cc3000/cc3000_common.h:334:71: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define ARRAY_TO_STREAM(p, a, l)  {register short _i; for (_i = 0; _i < l; _i++) *(p)++ = ((unsigned char *) a)[_i];}
                                                                       ^
libs/network/cc3000/wlan.c:652:4: note: in expansion of macro 'ARRAY_TO_STREAM'
    ARRAY_TO_STREAM(args, ucSsid, ulSsidLen);
    ^~~~~~~~~~~~~~~
libs/network/cc3000/cc3000_common.h:334:71: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define ARRAY_TO_STREAM(p, a, l)  {register short _i; for (_i = 0; _i < l; _i++) *(p)++ = ((unsigned char *) a)[_i];}
                                                                       ^
libs/network/cc3000/wlan.c:658:5: note: in expansion of macro 'ARRAY_TO_STREAM'
     ARRAY_TO_STREAM(args, p, ulPairwiseCipher_Or_TxKeyLen);
     ^~~~~~~~~~~~~~~
libs/network/cc3000/cc3000_common.h:334:71: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define ARRAY_TO_STREAM(p, a, l)  {register short _i; for (_i = 0; _i < l; _i++) *(p)++ = ((unsigned char *) a)[_i];}
                                                                       ^
libs/network/cc3000/wlan.c:689:4: note: in expansion of macro 'ARRAY_TO_STREAM'
    ARRAY_TO_STREAM(args, ucSsid, ulSsidLen);
    ^~~~~~~~~~~~~~~
libs/network/cc3000/cc3000_common.h:334:71: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define ARRAY_TO_STREAM(p, a, l)  {register short _i; for (_i = 0; _i < l; _i++) *(p)++ = ((unsigned char *) a)[_i];}
                                                                       ^
libs/network/cc3000/wlan.c:690:4: note: in expansion of macro 'ARRAY_TO_STREAM'
    ARRAY_TO_STREAM(args, ucPf_OrKey, ulPassPhraseLen);
    ^~~~~~~~~~~~~~~
libs/network/cc3000/wlan.c: In function 'wlan_ioctl_set_scan_params':
libs/network/cc3000/cc3000_common.h:334:71: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define ARRAY_TO_STREAM(p, a, l)  {register short _i; for (_i = 0; _i < l; _i++) *(p)++ = ((unsigned char *) a)[_i];}
                                                                       ^
libs/network/cc3000/wlan.c:887:2: note: in expansion of macro 'ARRAY_TO_STREAM'
  ARRAY_TO_STREAM(args, aiIntervalList, sizeof(unsigned long) *
  ^~~~~~~~~~~~~~~
CC targets/nrf5x/bluetooth_utils.o
CC targets/nrf5x/nrf5x_utils.o
CC /mnt/c/source/repos/github/espruino/Espruino/gen/jspininfo.o
CC src/jswrap_array.o
targets/nrf5x/jshardware.c: In function 'jshGetRandomNumber':
targets/nrf5x/jshardware.c:1225:34: warning: passing argument 1 of 'sd_rand_application_vector_get' from incompatible pointer type [-Wincompatible-pointer-types]
   sd_rand_application_vector_get(&v, sizeof(v));
                                  ^
In file included from /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/softdevice/s132/headers/ble_gap.h:48:0,
                 from /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/softdevice/s132/headers/ble.h:52,
                 from targets/nrf5x/bluetooth.h:15,
                 from targets/nrf5x/jshardware.c:30:
/mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/softdevice/s132/headers/nrf_soc.h:416:50: note: expected 'uint8_t * {aka unsigned char *}' but argument is of type 'unsigned int *'
 SVCALL(SD_RAND_APPLICATION_VECTOR_GET, uint32_t, sd_rand_application_vector_get(uint8_t * p_buff, uint8_t length));
                                                  ^
/mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/softdevice/s132/headers/nrf_svc.h:64:22: note: in definition of macro 'SVCALL'
   static return_type signature                          \
                      ^~~~~~~~~
targets/nrf5x/jshardware.c: In function 'jshGetFreeTimer':
targets/nrf5x/jshardware.c:596:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
CC src/jswrap_arraybuffer.o
CC src/jswrap_date.o
CC src/jswrap_error.o
CC src/jswrap_espruino.o
CC src/jswrap_flash.o
CC src/jswrap_functions.o
CC src/jswrap_interactive.o
CC src/jswrap_io.o
CC src/jswrap_json.o
CC src/jswrap_modules.o
CC src/jswrap_pin.o
CC src/jswrap_number.o
CC src/jswrap_object.o
CC src/jswrap_onewire.o
CC src/jswrap_pipe.o
CC src/jswrap_process.o
CC src/jswrap_promise.o
CC src/jswrap_serial.o
CC src/jswrap_spi_i2c.o
CC src/jswrap_stream.o
CC src/jswrap_string.o
CC src/jswrap_waveform.o
CC libs/filesystem/jswrap_fs.o
CC libs/filesystem/jswrap_file.o
CC libs/math/jswrap_math.o
CC libs/graphics/jswrap_graphics.o
CC libs/network/jswrap_net.o
CC libs/network/http/jswrap_http.o
CC libs/network/js/jswrap_jsnetwork.o
CC libs/network/cc3000/jswrap_cc3000.o
CC libs/bluetooth/jswrap_bluetooth.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/toolchain/system_nrf52.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/drivers_nrf/hal/nrf_saadc.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/ble/ble_services/ble_hids/ble_hids.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/nfc/ndef/uri/nfc_uri_msg.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/nfc/ndef/uri/nfc_uri_rec.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/nfc/ndef/generic/message/nfc_ndef_msg.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/nfc/ndef/generic/record/nfc_ndef_record.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/nfc/t2t_lib/hal_t2t/hal_nfc_t2t.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/libraries/util/app_error.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/libraries/timer/app_timer.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/libraries/fstorage/fstorage.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/libraries/util/nrf_assert.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/libraries/uart/app_uart.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/drivers_nrf/common/nrf_drv_common.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/drivers_nrf/gpiote/nrf_drv_gpiote.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/drivers_nrf/uart/nrf_drv_uart.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/ble/common/ble_advdata.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/ble/ble_advertising/ble_advertising.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/ble/common/ble_conn_params.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/ble/ble_services/ble_nus/ble_nus.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/ble/common/ble_srv_common.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/softdevice/common/softdevice_handler/softdevice_handler.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/drivers_nrf/hal/nrf_nvmc.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/drivers_nrf/twi_master/nrf_drv_twi.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/drivers_nrf/spi_master/nrf_drv_spi.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/drivers_nrf/ppi/nrf_drv_ppi.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/drivers_nrf/hal/nrf_adc.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/drivers_nrf/clock/nrf_drv_clock.o
CC /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/libraries/util/app_util_platform.o
arm-none-eabi-gcc    -c -o /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/toolchain/gcc/gcc_startup_nrf52.o /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/toolchain/gcc/gcc_startup_nrf52.S
CC src/jslex.o
CC src/jsvar.o
CC src/jsvariterator.o
CC src/jsutils.o
CC src/jsnative.o
src/jslex.c: In function 'jslNewFromLexer':
src/jslex.c:806:10: warning: unused variable 'l' [-Wunused-variable]
   size_t l = maxLength;
          ^
CC src/jsparse.o
CC src/jspin.o
CC src/jsinteractive.o
CC src/jsdevices.o
CC src/jstimer.o
src/jspin.c: In function 'jshGetPinString':
src/jspin.c:104:12: warning: comparison is always true due to limited range of data type [-Wtype-limits]
         pin>=JSH_PORTA_OFFSET &&
            ^~
src/jspin.c:106:12: warning: comparison is always false due to limited range of data type [-Wtype-limits]
         pin<JSH_PORTA_OFFSET+JSH_PORTA_COUNT) {
            ^
src/jspin.c:109:19: warning: comparison is always true due to limited range of data type [-Wtype-limits]
     } else if (pin>=JSH_PORTB_OFFSET && pin<JSH_PORTB_OFFSET+JSH_PORTB_COUNT) {
                   ^~
src/jspin.c:109:44: warning: comparison is always false due to limited range of data type [-Wtype-limits]
     } else if (pin>=JSH_PORTB_OFFSET && pin<JSH_PORTB_OFFSET+JSH_PORTB_COUNT) {
                                            ^
src/jspin.c:112:19: warning: comparison is always true due to limited range of data type [-Wtype-limits]
     } else if (pin>=JSH_PORTC_OFFSET && pin<JSH_PORTC_OFFSET+JSH_PORTC_COUNT) {
                   ^~
src/jspin.c:112:44: warning: comparison is always false due to limited range of data type [-Wtype-limits]
     } else if (pin>=JSH_PORTC_OFFSET && pin<JSH_PORTC_OFFSET+JSH_PORTC_COUNT) {
                                            ^
src/jspin.c:115:19: warning: comparison is always true due to limited range of data type [-Wtype-limits]
     } else if (pin>=JSH_PORTD_OFFSET && pin<JSH_PORTD_OFFSET+JSH_PORTD_COUNT) {
                   ^~
CC src/jsi2c.o
CC src/jsspi.o
CC src/jshardware_common.o
CC /mnt/c/source/repos/github/espruino/Espruino/gen/jswrapper.o
LD espruino_1v91.33_nrf52832.elf
targets/nrf5x/jshardware.c: In function 'cc3000_spi_write':
/mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/drivers_nrf/delay/nrf_delay.h:123:22: warning: inlining failed in call to 'nrf_delay_us': call is unlikely and code size would grow [-Winline]
 __STATIC_INLINE void nrf_delay_us(uint32_t number_of_us)
                      ^
targets/nrf5x/jshardware.c:357:3: note: called from here
   nrf_delay_us((uint32_t)microsec);
   ^
/mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/drivers_nrf/delay/nrf_delay.h:123:22: warning: inlining failed in call to 'nrf_delay_us': call is unlikely and code size would grow [-Winline]
 __STATIC_INLINE void nrf_delay_us(uint32_t number_of_us)
                      ^
targets/nrf5x/jshardware.c:357:3: note: called from here
   nrf_delay_us((uint32_t)microsec);
   ^
/mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/drivers_nrf/delay/nrf_delay.h:123:22: warning: inlining failed in call to 'nrf_delay_us': call is unlikely and code size would grow [-Winline]
 __STATIC_INLINE void nrf_delay_us(uint32_t number_of_us)
                      ^
targets/nrf5x/jshardware.c:357:3: note: called from here
   nrf_delay_us((uint32_t)microsec);
   ^
targets/nrf5x/jshardware.c: In function 'SpiWriteDataSynchronous.part.1':
/mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/drivers_nrf/delay/nrf_delay.h:123:22: warning: inlining failed in call to 'nrf_delay_us': call is unlikely and code size would grow [-Winline]
 __STATIC_INLINE void nrf_delay_us(uint32_t number_of_us)
                      ^
targets/nrf5x/jshardware.c:357:3: note: called from here
   nrf_delay_us((uint32_t)microsec);
   ^
targets/nrf5x/bluetooth.c: In function 'ble_app_error_handler':
/mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/toolchain/cmsis/include/core_cm4.h:1790:22: warning: inlining failed in call to 'NVIC_SystemReset': call is unlikely and code size would grow [-Winline]
 __STATIC_INLINE void NVIC_SystemReset(void)
                      ^
targets/nrf5x/bluetooth.c:156:3: note: called from here
   NVIC_SystemReset();
   ^
/mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/drivers_nrf/delay/nrf_delay.h:123:22: warning: inlining failed in call to 'nrf_delay_us': call is unlikely and code size would grow [-Winline]
 __STATIC_INLINE void nrf_delay_us(uint32_t number_of_us)
                      ^
/mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/drivers_nrf/delay/nrf_delay.h:216:5: note: called from here
     nrf_delay_us(1000*number_of_ms);
     ^
/mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/toolchain/system_nrf52.c: In function 'SystemInit':
/mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/toolchain/cmsis/include/core_cm4.h:1790:22: warning: inlining failed in call to 'NVIC_SystemReset': call is unlikely and code size would grow [-Winline]
 __STATIC_INLINE void NVIC_SystemReset(void)
                      ^
/mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/toolchain/system_nrf52.c:172:13: note: called from here
             NVIC_SystemReset();
             ^
GEN espruino_1v91.33_nrf52832.lst
GEN espruino_1v91.33_nrf52832.hex
Merging SoftDevice
python scripts/hexmerge.py /mnt/c/source/repos/github/espruino/Espruino/targetlibs/nrf5x/components/softdevice/s132/hex/s132_nrf52_3.0.0_softdevice.hex espruino_1v91.33_nrf52832.hex -o tmp.hex
mv tmp.hex espruino_1v91.33_nrf52832.hex
root@DESKTOP-O5H58VV:/mnt/c/source/repos/github/espruino/Espruino#

@gfwilliams
Copy link
Member

looks really promising - as long as the compiler's up to date it seems like it'll be fine. Shame about the lack of USB/Bluetooth, but still - being able to compile is a huge help for everyone

@OwenBrotherwood
Copy link
Author

OwenBrotherwood commented Jan 31, 2017

Number one rule of open source: ensure that the work one would like to do is in line with the git master.
I continue.

Windows 10 is the last non-linux from Microsoft: an apple os9 to osX the microsoft way is happening with a Windows Desktop.
Bill Gates get's his wish a https://en.wikipedia.org/wiki/Xenix comes back as AT&T licensing issues are in the past (history)

@OwenBrotherwood
Copy link
Author

nRF52-DK via bluetooth and SD Card using Bash On Linux On Windows's above hex

image

@OwenBrotherwood
Copy link
Author

OwenBrotherwood commented Jan 31, 2017

Quick Doc to be placed in docs when structure found

whoami

add-apt-repository ppa:team-gcc-arm-embedded/ppa
apt-get update
apt-get upgrade

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -

sudo apt-get install -y \
  build-essential lib32z1 lib32ncurses5 lib32bz2-1.0 lib32ncurses5 ia32-libs git \
  nodejs \
  gcc-arm-embedded

mkdir -p /mnt/c/source/repos/github/espruino
cd /mnt/c/source/repos/github/espruino

git clone https://github.com/espruino/EspruinoTools.git
git clone https://github.com/espruino/Espruino.git
git clone https://github.com/espruino/EspruinoDocs.git
git clone https://github.com/espruino/EspruinoWebIDE.git

cd Espruino
make clean && make
make clean && NRF52832DK=1 USE_FILESYSTEM=1 RELEASE=1 make
make clean && MICROBIT=1 RELEASE=1 make

Edit:
Notes from feedback further down to be incorporated in an easy user experience
installdir = /usr/local # For the time being : I remember reading some suggestion for this (found http://gnuarmeclipse.github.io/toolchain/install/)

mkdir -p ${installdir}
cd ${installdir}
wget https://launchpad.net/gcc-arm-embedded/5.0/5-2016-q3-update/+download/gcc-arm-none-eabi-5_4-2016q3-20160926-linux.tar.bz2
tar xjf gcc-arm-none-eabi-5_4-2016q3-20160926

wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/6-2016q4/gcc-arm-none-eabi-6_2-2016q4-20161216-linux.tar.bz2
tar xjf gcc-arm-none-eabi-6_2-2016q4-20161216-linux.tar.bz2

add path to the toolchain of choice (to be tested)

@gfwilliams
Copy link
Member

You probably don't want add-apt-repository ppa:team-gcc-arm-embedded/ppa

As per the build instructions you want to install this one directly - not using the ppa as it's usually out of date

@OwenBrotherwood
Copy link
Author

OwenBrotherwood commented Jan 31, 2017

Remember, you are the git-master so you have the last call
But ...

https://launchpad.net/gcc-arm-embedded

As previously announced all new binary and source packages will not be released on Launchpad henceforth, they can be found on:
https://developer.arm.com/open-source/gnu-toolchain/gnu-rm.
PPA location remains unchanged <--------------------------------------------------

Moving forward means also means a sub-project of embrassing ver 6.0

image

@OwenBrotherwood
Copy link
Author

I have not had time to check the code for support for ip port in a espurino -p 127.0.0.1:2323 scenario.
Ordinary telnet works, as can be seen in the screen dump

image

@gfwilliams
Copy link
Member

Yes, that's because it doesn't support it yet: espruino/EspruinoTools#32

I don't believe it says it can do that anywhere in the docs or help?

@OwenBrotherwood
Copy link
Author

I had not read of support, so I had guessed not supported.
A text based espurino, interpreter, coupled with a text based cli tool can help in testing as all testing is "local on the machine" for CI in connection with user based input of some tests.

That about wraps up the quick test of Bash on Ubuntu on Windows

I will continue to use Bash on Ubuntu on Windows, but for the record, let us agree on the reference OS and compiler to be used so I do not report problems that may be my OS and choice of compiler.

@gfwilliams
Copy link
Member

I use Ubuntu (16.04 currently), and GCC 5.4.1 - realistically that's the thing that all the tools are designed and run on here.

@OwenBrotherwood
Copy link
Author

If I have issues which could be os, I fire up a VM with 16.xx.
I will alter the installation procedure to allow for the installation of two versions of GCC

  • GCC 5.4.1
  • "The latest and greatest from arm" : allows a look at future while trying not to cause to much pain in the present.

Basically, run both and do a diff on the output to see if one gets a heads-up for hidden things that could be "interesting"
All automatic with a bash script for those who wish to use time on it.

@gfwilliams
Copy link
Member

I'm not sure I really see what this will add? If you diff the listings you'll almost certainly see a massive difference between versions - different registers, instructuion order, etc.

@OwenBrotherwood
Copy link
Author

I think I expressed myself unclearly: I continue to test and doc and then we take it "then".
But in the meantime, the output difference would be from stdout/error from the make from the two gcc versions that can give a "heads-up".
For my own personal use, I prefer to be at the top of the gcc and can allways revert if problems and supply upstream issues. It is presumed that there is real value in v6 contra v5 . It is presumed that v5 is bug fixed and at times a change in the ver5 used can give value, but as stated, I do not know if there is value in v6.
Having now written all the above, I conclude that lattest and greates v5/6 plus the git masters prefered v5 are "interesting"

@gfwilliams
Copy link
Member

Yes, it would be interesting to compare - however I'm not sure adding a script/documentation to the Espruino repository on doing this would be useful to many people?

I mean, it's a very rare thing to want to do, and anyone who cared would likely do it themselves in a few lines of bash anyway, rather than searching to see if it had already been done.

@OwenBrotherwood
Copy link
Author

It would only be useful at certain times.
I will have a little script in connection with my own usage of gcc before raising issues by ensuring os and gcc are the base for your development.
I agree with your comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants