Taking photo using GR-LYCHEE through Pelion Device Management.
This firmware project works for GR-LYCHEE and GR-PEACH.
Steps to build this firmware with Mbed CLI
Import project
$ mbed import http://os.mbed.com/users/coisme/code/Pelion-GR-LYCHEE-camera-firmware/
Setting
- Ethernet (GR-PEACH only)
- Change the file name
mbed_app.RZ_A1H_Ethernet.json
tombed_app.json
- Change the file name
- Wi-Fi
- Change the Wi-Fi setting in
mbed_app.json
, i.e.nsapi.default-wifi-ssid
andnsapi.default-wifi-password
- Change the Wi-Fi setting in
If you haven't set your Pelion API key, run the following command.
$ mbed config -G CLOUD_SDK_API_KEY <API_KEY>
Setting for Pelion Device Management
$ mbed dm init -d "example.com" --model-name "PELION_DEMO" -q --force
Compile
For GR-LYCHEE:
$ mbed compile -t GCC_ARM -m GR_LYCHEE
For GR-PEACH:
$ mbed compile -t GCC_ARM -m RZ_A1H
Write the created .bin
file to your GR-LYCHEE/PEACH.
That's it! :-)
LED Status Indicator
LEDs next to UB0 show the status of your GR-LYCHEE/PEACH.
LED# | GR-LYCHEE | GR-PEACH | Status | Description |
---|---|---|---|---|
LED1 | green | red | Normal | Turned on after the device is registered to Pelion Device Management successfully. |
LED2 | yellow | green | Error | Turned on when the network initialization failed. Check your Wi-Fi setting. |
LED3 | orange | blue | Error | Turned on when the Pelion Device Management Client initialization failed. Check your SD card. |
LED4 | red | red | Error | Turned on when the network is disconnected. Check your Wi-Fi network status. |
Clear device identity
If you want to clear the device's identity, connect to the device via serial terminal. Then input r
command. The device flushes the identity storage, then reboot.
Known Issues
client_error(6) -> Client in reconnection mode NetworkError
appears when connecting to network, but eventually connection will be established.- Warning message
"MBEDTLS_TEST_NULL_ENTROPY has been enabled. This configuration is not secure and is not suitable for production use"
appears when compiling the project for GR-PEACH. This can be ignored in development stage.
bootloader/bootloader_app.json@19:bdc69891952a, 2019-06-27 (annotated)
- Committer:
- Osamu Koizumi
- Date:
- Thu Jun 27 13:14:25 2019 +0900
- Revision:
- 19:bdc69891952a
- Parent:
- 2:a5b5f3df19e8
Changed LED references to enable GR-PEACH
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
MACRUM | 0:6d2053b84a92 | 1 | { |
MACRUM | 0:6d2053b84a92 | 2 | "macros": [ |
MACRUM | 0:6d2053b84a92 | 3 | "MBEDTLS_USER_CONFIG_FILE=\"bootloader_mbedtls_user_config.h\"", |
MACRUM | 0:6d2053b84a92 | 4 | "SHOW_PROGRESS_BAR=0", |
MACRUM | 0:6d2053b84a92 | 5 | "MAX_COPY_RETRIES=1", |
MACRUM | 0:6d2053b84a92 | 6 | "MAX_BOOT_RETRIES=3", |
MACRUM | 0:6d2053b84a92 | 7 | "ARM_BOOTLOADER_USE_NVSTORE_ROT=1", |
MACRUM | 0:6d2053b84a92 | 8 | "ARM_UC_USE_PAL_CRYPTO=0", |
MACRUM | 0:6d2053b84a92 | 9 | "ARM_UC_USE_PAL_BLOCKDEVICE=1", |
MACRUM | 0:6d2053b84a92 | 10 | "ARM_UC_PAAL_TRACE_ENABLE=0", |
MACRUM | 0:6d2053b84a92 | 11 | "ARM_UC_PROFILE_MBED_CLOUD_CLIENT=1", |
MACRUM | 0:6d2053b84a92 | 12 | "ARM_UC_FEATURE_CRYPTO_PAL=0", |
MACRUM | 0:6d2053b84a92 | 13 | "ARM_UC_FEATURE_CRYPTO_MBEDTLS=1", |
MACRUM | 0:6d2053b84a92 | 14 | "MBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FLASHIAP_BLOCKDEVICE", |
MACRUM | 0:6d2053b84a92 | 15 | "DEFAULT_MAX_APPLICATION_SIZE=(MBED_CONF_APP_FLASH_START_ADDRESS + MBED_CONF_APP_FLASH_SIZE - MBED_CONF_APP_APPLICATION_START_ADDRESS)", |
MACRUM | 0:6d2053b84a92 | 16 | "DISABLE_ERROR_DESCRIPTION=1", |
MACRUM | 0:6d2053b84a92 | 17 | "Mutex=PlatformMutex" |
MACRUM | 0:6d2053b84a92 | 18 | ], |
MACRUM | 0:6d2053b84a92 | 19 | "config": { |
MACRUM | 0:6d2053b84a92 | 20 | "application-start-address": { |
MACRUM | 0:6d2053b84a92 | 21 | "help": "Address to the beginning of the active application firmware in flash", |
MACRUM | 0:6d2053b84a92 | 22 | "value": null |
MACRUM | 0:6d2053b84a92 | 23 | }, |
MACRUM | 0:6d2053b84a92 | 24 | "application-jump-address": { |
MACRUM | 0:6d2053b84a92 | 25 | "help": "Jump address for running the active application firmware", |
MACRUM | 0:6d2053b84a92 | 26 | "value": null |
MACRUM | 0:6d2053b84a92 | 27 | }, |
MACRUM | 0:6d2053b84a92 | 28 | "max-application-size": { |
MACRUM | 0:6d2053b84a92 | 29 | "help": "Maximum size of the active application", |
MACRUM | 0:6d2053b84a92 | 30 | "value": null |
MACRUM | 0:6d2053b84a92 | 31 | }, |
MACRUM | 0:6d2053b84a92 | 32 | "flash-start-address": { |
MACRUM | 0:6d2053b84a92 | 33 | "help": "Start address of internal flash. Only used in this config to help the definition of other macros.", |
MACRUM | 0:6d2053b84a92 | 34 | "value": null |
MACRUM | 0:6d2053b84a92 | 35 | }, |
MACRUM | 0:6d2053b84a92 | 36 | "flash-size": { |
MACRUM | 0:6d2053b84a92 | 37 | "help": "Total size of internal flash. Only used in this config to help the definition of other macros.", |
MACRUM | 0:6d2053b84a92 | 38 | "value": null |
MACRUM | 0:6d2053b84a92 | 39 | } |
MACRUM | 0:6d2053b84a92 | 40 | }, |
MACRUM | 0:6d2053b84a92 | 41 | "target_overrides": { |
MACRUM | 0:6d2053b84a92 | 42 | "*": { |
MACRUM | 0:6d2053b84a92 | 43 | "target.features_remove" : ["LWIP"], |
MACRUM | 0:6d2053b84a92 | 44 | "target.features_add" : ["COMMON_PAL"], |
MACRUM | 0:6d2053b84a92 | 45 | "platform.stdio-baud-rate" : 115200, |
MACRUM | 0:6d2053b84a92 | 46 | "platform.stdio-flush-at-exit" : false, |
MACRUM | 0:6d2053b84a92 | 47 | "update-client.storage-address" : "(1024*1024*64)", |
MACRUM | 0:6d2053b84a92 | 48 | "update-client.storage-size" : "(1024*1024*2)", |
MACRUM | 0:6d2053b84a92 | 49 | "update-client.storage-locations" : 1, |
MACRUM | 0:6d2053b84a92 | 50 | "update-client.firmware-header-version": "2" |
MACRUM | 0:6d2053b84a92 | 51 | }, |
MACRUM | 2:a5b5f3df19e8 | 52 | "RZ_A1H": { |
MACRUM | 2:a5b5f3df19e8 | 53 | "flash-start-address" : "0x18000000", |
MACRUM | 2:a5b5f3df19e8 | 54 | "flash-size" : "(8*1024*1024)", |
MACRUM | 2:a5b5f3df19e8 | 55 | "nvstore.area_1_address" : "(MBED_CONF_APP_FLASH_START_ADDRESS + MBED_CONF_APP_FLASH_SIZE - 2*(4*1024))", |
MACRUM | 2:a5b5f3df19e8 | 56 | "nvstore.area_1_size" : "(4*1024)", |
MACRUM | 2:a5b5f3df19e8 | 57 | "nvstore.area_2_address" : "(MBED_CONF_APP_FLASH_START_ADDRESS + MBED_CONF_APP_FLASH_SIZE - 1*(4*1024))", |
MACRUM | 2:a5b5f3df19e8 | 58 | "nvstore.area_2_size" : "(4*1024)", |
MACRUM | 2:a5b5f3df19e8 | 59 | "update-client.application-details": "(MBED_CONF_APP_FLASH_START_ADDRESS+64*1024)", |
MACRUM | 2:a5b5f3df19e8 | 60 | "application-start-address" : "(MBED_CONF_APP_FLASH_START_ADDRESS+65*1024)", |
MACRUM | 2:a5b5f3df19e8 | 61 | "max-application-size" : "DEFAULT_MAX_APPLICATION_SIZE", |
MACRUM | 2:a5b5f3df19e8 | 62 | "sd.SPI_MOSI": "P8_5", |
MACRUM | 2:a5b5f3df19e8 | 63 | "sd.SPI_MISO": "P8_6", |
MACRUM | 2:a5b5f3df19e8 | 64 | "sd.SPI_CLK": "P8_3", |
MACRUM | 2:a5b5f3df19e8 | 65 | "sd.SPI_CS": "P8_4" |
MACRUM | 2:a5b5f3df19e8 | 66 | }, |
MACRUM | 0:6d2053b84a92 | 67 | "GR_LYCHEE": { |
MACRUM | 0:6d2053b84a92 | 68 | "flash-start-address" : "0x18000000", |
MACRUM | 0:6d2053b84a92 | 69 | "flash-size" : "(8*1024*1024)", |
MACRUM | 0:6d2053b84a92 | 70 | "nvstore.area_1_address" : "(MBED_CONF_APP_FLASH_START_ADDRESS + MBED_CONF_APP_FLASH_SIZE - 2*(4*1024))", |
MACRUM | 0:6d2053b84a92 | 71 | "nvstore.area_1_size" : "(4*1024)", |
MACRUM | 0:6d2053b84a92 | 72 | "nvstore.area_2_address" : "(MBED_CONF_APP_FLASH_START_ADDRESS + MBED_CONF_APP_FLASH_SIZE - 1*(4*1024))", |
MACRUM | 0:6d2053b84a92 | 73 | "nvstore.area_2_size" : "(4*1024)", |
MACRUM | 0:6d2053b84a92 | 74 | "update-client.application-details": "(MBED_CONF_APP_FLASH_START_ADDRESS + 64*1024)", |
MACRUM | 0:6d2053b84a92 | 75 | "application-start-address" : "(MBED_CONF_APP_FLASH_START_ADDRESS + 65*1024)", |
MACRUM | 0:6d2053b84a92 | 76 | "max-application-size" : "DEFAULT_MAX_APPLICATION_SIZE", |
MACRUM | 0:6d2053b84a92 | 77 | "sd.SPI_MOSI": "P5_6", |
MACRUM | 0:6d2053b84a92 | 78 | "sd.SPI_MISO": "P5_7", |
MACRUM | 0:6d2053b84a92 | 79 | "sd.SPI_CLK": "P5_4", |
MACRUM | 0:6d2053b84a92 | 80 | "sd.SPI_CS": "P5_5" |
MACRUM | 0:6d2053b84a92 | 81 | } |
MACRUM | 0:6d2053b84a92 | 82 | } |
MACRUM | 0:6d2053b84a92 | 83 | } |