Giter Club home page Giter Club logo

anyl-wallet's People

Contributors

bdjukic avatar devtodev avatar lorepieri8 avatar marcinwilkabl avatar mohitkagnihotri avatar npes-95 avatar pcppcp avatar randomshinichi avatar vishav26 avatar wilkwilq avatar wonjongshin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

anyl-wallet's Issues

macOS compilation error: <endian.h> file not found

This file isn't found when compiling under macOS. To compile under macOS, you need to modify the include in helpers/rlp_encoder.c to read:

#include <machine/endian.h>

Would this still be valid under Linux?

OS: zephyr compilation

Make the code compilable using Zephyr OS build system.

Notes:

  • The code should still compile as a standalone x86 build.
  • currentmain.c can be removed

[META] v3.0

Rough overview of features/requirements for v3.0:

  • zephyr OS integration

    • read some real world data from a hw sensor
    • (optional) BLE connectivity
  • ethereum

    • transaction encoding and signing
    • (optional) eth node CoAP proxy (for the demo we will use HTTP)
    • web3-compatible library
  • transport layer

    • (easiest) CoAP over serial interface / console - requires a script on the other side (gateway)
    • (possible) PPP (serial port) networking
    • (best) BLE 6LoWPAN โœ“
  • gateway

    • leshan
      • device status
    • ethereum service
  • visualize data stored on chain

    • script that returns a formatted list of transactions for a given address

CI: prepare a gcc docker image for circleCI

Problem:
We are using CircleCI for the pull requests CI. However, CircleCI doesn't provide an image with all the required tools installed.
For now the setup uses CircleCI's python3.6 image, plus a script that installs C related dependencies.
What's wrong? Python image is too big (it includes browsers and node.js and whatnot), and dependencies must be installed for every run.

  • create a docker setup using basic CircleCI's ubuntu image
  • install dependencies to it
  • make sure the image can be used by the CircleCI runs (PR's CI has to pass anyway)
  • there should be a method to repeatedly rebuild the image (in case we want to update the base system or install additional tools)

resources:
https://circleci.com/docs/2.0/custom-images/

Could NOT find Threads (missing: Threads_FOUND)

Hi,
I am new here and I am trying to setup the environment for the build. I am getting this error:
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.10/Modules/FindThreads.cmake:205 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
tests/CMakeLists.txt:3 (find_package)

I have successfully installed pthreads using this command:
sudo apt-get install libpthread-stubs0-dev

But still I am getting this error. Can someone help me here please?

Regards
Vishav

testing: transaction encoding and signing

Create tests for the eth/transaction.h module.

The tests should initialize transaction_t data structure, call tx_encode() and compare the output with a known signed transaction.

Also see: test_tx

Test data generator (Python3)

from eth_account.internal.transactions import UnsignedTransaction, Transaction
from eth_utils import decode_hex, encode_hex, to_checksum_address
from coincurve import PrivateKey
import rlp
tx = UnsignedTransaction(1, 1, 300, decode_hex(to_checksum_address('0x7e5f4552091a69125d5dfcb7b8c2659029395bdf')), 1, b'')
print("unsigned: " + encode_hex(rlp.encode(tx)))
# sign (for key 000.00001)
k = PrivateKey.from_hex(31*'00' + '01')
sign = k.sign_recoverable(rlp.encode(tx))
(r, s, v) = int.from_bytes(sign[:32], byteorder='big'), int.from_bytes(sign[32:64], byteorder='big'), sign[64]
signed_tx = Transaction(*tx.as_dict().values(), r, s, v)
print("signed: " + encode_hex(rlp.encode(signed_tx)))

Name of array is alredy a pointer (more the same bugs at once)

DEMO: account management

Basic utilities to demo that ethereum connectivity works. This applies to the wallet shell submodule.

  • set private key (pk)
  • update the account nonce & balance from the eth node (sync)
  • display account details (info)
  • generate a plain transaction that transfers X ether to a destination address (transfer)
  • maintain list of a last N transaction hashes and display count of confirmations on request (txs)
  • query current block info from the node (block)

eth module: `privkey_to_address()`

Create function
int privkey_to_address(const privkey_t *pk, address_t *out)

Params:

  • const privkey_t *pk - private key
  • address_t *out - address of the supplied private key

Return value:

  • 0 - success
  • -1 - error

eth module: `eth_encode_tx()`

Create function
int eth_encode_tx(const transaction_t *tx, uint8_t *result, size_t *result_size)

Params:

  • transaction_t tx - description of a transaction
  • uint8_t *result - buffer that will contain RLP encoded transaction. The buffer must be allocated by the user
  • size_t *result_size - size of the supplied buffer. On success, encoded transaction length will be set by the call.

Return value:

  • 0 - success
  • -1 - error

zephyr: support unix timestamps

Zephyr's kernel measures only time since the boot.

To support real-world timestamps, the build must have either:

  1. persistent hardware clock unit like DS3231 (or an emulation for qemu builds)
  2. NTP client that will update the time on boot (there's SNTP support in Zephyr)

DEMO: web3 connection

support for basic JSON RPC API queries:

  • eth_getTransactionCount()
  • eth_getBalance()
  • eth_sendRawTransaction()
  • eth_blockNumber()
  • eth_getTransactionByHash()

[META] testing: create unit tests for the helpers

helper/ directory contains some useful modules, pulled from all over the internet. Unfortunately, it lacks tests for this code.

Task: create unit tests for following modules:

  • byte_converter.c
  • crypto_helper.c
  • hextobin.c
  • rlp_encoder.c
  • uint256.c

eth unit converter

We'll need a helper function that can convert between different ethereum units.

The function should take an uint256 as an input, and convert & format it to a desired unit type.

int eth_convert(const uint256_t *amount, enum unit from, enum unit to, char *buf, size_t buf_size);

example

>> eth_convert(0x2406d0096ba0007624, ETH_UNIT_WEI, ETH_UNIT_ETH, out, out_size);
>> print out
664.5736893707777777

Formalize the embedded wallet API

Create a blockchain agnostic API that can be called by the embedded application software to use the crytpo functionalities such as signing data with the private keys and sending transactions.

[META] basic utils for building an ethereum transaction

Goal

To create set of utilities that will help building and encoding an ethereum transaction on an embedded device.

Required features

  • int eth_encode_tx(const transaction_t *tx, uint8_t *result, size_t *result_size); - returns a RLP-encoded transaction data
  • int eth_sign(const privkey_t *pk, const uint8_t *data, size_t data_size, signature_t *sig_out) - signs arbitary data and fills in the signature_t structure
  • int eth_encode_and_sign_tx(const privkey_t *pk, const transaction_t *tx, uint8_t *result, size_t *result_size); - encode and sign an ethereum transaction
  • int privkey_to_address(const privkey_t *pk, address_t *out) - convert ECDSA private key to the ethereum address
  • int address_from_signature(const uint8_t *data, size_t data_len, const signature_t *signature, address_t *addr_out) - perform ECVerify on supplied data and return signer's address
  • ... to be updated ....

Requirements

  • must not use dynamic memory
  • must be decoupled from hardware-specific code (this is especially important for the crypto functions)
  • sanity checks in place to ensure consistency of input/output data
  • every routine must have an appropriate test using gtest framework. Test data can be generated by python's ethereum libraries.

Other remarks

  • EIP155 support would be nice
  • Do not close this issue - it's purpose is to keep track of sub-issues that are related to it

CI: create Zephyr builds

Create another CI job that will download & setup Zephyr SDK + crosscompile our application.

No tests are required at the moment, the purpose is to verify that the firmware can be built for both arm and CI/x86.

Conflict on nrf52840_pca10056 build

When the CONFIG_NET_SHELL parameter was added to prj.conf crash the nrf52840_pca10056 build because generate a conflict with CONFIG_KERNEL_SHELL.

This error not happen with x86 because zephyr is only availble with nrf52840_pca10056 build.

Building/Installing GTest dependancy for macOS

The the libgtest-dev package is not listed on Homebrew for macOS: need to find alternative instructions to build this dependancy on macOS. Possible leads:

Closing the issue: verify these instructions perform the same operation as the current one for Linux.

CI: create a macOS builds

To make sure we are compatible with the Apple minority, we should have a Mac OS build on CircleCI.

  • create MacOS setup in .circleci/config.yaml
  • build x86 target on the MacOS image & run the tests

[META] Getting data out of the board

A very important part is a working network connection from the board to the outside world.

LoWPAN6 BLE connection

Our primary target

Pros:

  • cool and wireless
  • full network stack
  • can use any linux PC as a gateway

Cons:

  • hard to set up

PPP

network transport utilizing serial port. Not sure if it is possible to have more USB serial connections in Zephyr

Pros:

  • full network stack
  • compatible with most OS

Cons:

  • not sure if there's a support for this network layer in Zephyr
  • requires a USB connection

Mock script

For a quick demo we can set up a script reading data from the ttyACM serial line and sending them to our gateway/ethereum node/Leshan

Pros:

  • easy to set up

Cons:

  • no 2-way connection
  • app specific

DEMO: eth node

To be able to use ethereum's JSONRPC api, the node must have an access to an ethereum node

one of these must be completed:

  • connect to infura.io using Zephyr's HTTPS client
  • proxy infura to HTTP/localhost (requires a proxy that can rewrite Host: header)
  • run our node in the cloud and forward the port via ssh tunnel

[META] v3.1

Rough overview of features/requirements for v3.1:

  • Shell interface

    • create and delete accounts postponed: it must be decided how will the accounts work
    • display balance of the account
    • transfer eth to another address
    • check transaction status, get tx receipt
  • Smart Contracts

    • make it possible to execute smart contract method
    • ERC20 Support

Installing Requirements using Python

In the readme.md the command pip install --user -r requirements.txt doesn't work as web3 requires Python >=3.5.
May be update it to pip3 install --user -r requirements.txt

DEMO: add hardware sensor

The demo will use a data from a simple hardware sensor (temperature, humidity, whatever)

DS18B20, BME280, DHT11, DHT22

  • read sensor data in Zephyr
  • create api that will make the data available application-wide to the other services (lwm2m client, http uploader)
  • make sure mocked sensor hardware + data are available in QEMU

Failed Zephyr Build MacOS

lorenzo@MacBook-Air-di-Lorenzo ~/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet $ mkdir build && cd build
 lorenzo@MacBook-Air-di-Lorenzo ~/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build $ cmake -GNinja -DBOARD=nrf52840_pca10056 -DBUILD_XCOMPILE=1 ../
-- Found PythonInterp: /Users/lorenzo/anaconda/bin/python3 (found suitable version "3.6", minimum required is "3") 
-- Found PythonInterp: /Users/lorenzo/anaconda/bin/python3 (found suitable version "3.6", minimum required is "3.4") 
-- Selected BOARD nrf52840_pca10056
Zephyr version: 1.13.99
Parsing Kconfig tree in /Users/lorenzo/gitHubRepo/zephyr/Kconfig
Loading /Users/lorenzo/gitHubRepo/zephyr/boards/arm/nrf52840_pca10056/nrf52840_pca10056_defconfig as base
Merging /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/prj.conf
CMake Warning at /Users/lorenzo/gitHubRepo/zephyr/cmake/toolchain.cmake:48 (message):
  gccarmemb is deprecated, please use gnuarmemb instead
Call Stack (most recent call first):
  /Users/lorenzo/gitHubRepo/zephyr/cmake/app/boilerplate.cmake:269 (include)
  CMakeLists.txt:14 (include)


CMake Warning at /Users/lorenzo/gitHubRepo/zephyr/cmake/toolchain/gnuarmemb.cmake:4 (message):
  GCCARMEMB_TOOLCHAIN_PATH is deprecated, please use GNUARMEMB_TOOLCHAIN_PATH
  instead
Call Stack (most recent call first):
  /Users/lorenzo/gitHubRepo/zephyr/cmake/toolchain.cmake:66 (include)
  /Users/lorenzo/gitHubRepo/zephyr/cmake/app/boilerplate.cmake:269 (include)
  CMakeLists.txt:14 (include)


-- Generating zephyr/include/generated/generated_dts_board.h
nrf52840_pca10056.dts_compiled: Warning (unique_unit_address): /soc/i2c@40003000: duplicate unit-address (also used in node /soc/spi@40003000)
nrf52840_pca10056.dts_compiled: Warning (unique_unit_address): /soc/i2c@40004000: duplicate unit-address (also used in node /soc/spi@40004000)
-- Cache files will be written to: /Users/lorenzo/Library/Caches/zephyr
-- The C compiler identification is GNU 7.3.1
-- The CXX compiler identification is GNU 7.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /Users/lorenzo/gcc-arm-none-eabi-7-2018-q2-update/bin/arm-none-eabi-gcc
-- Performing Test toolchain_is_ok
-- Performing Test toolchain_is_ok - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build
 lorenzo@MacBook-Air-di-Lorenzo ~/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build $ ninja && ninja flash
[2/227] Building C object helpers/CMakeFiles/helpers.dir/byte_converter.c.obj
../helpers/byte_converter.c: In function 'char_to_bytes':
../helpers/byte_converter.c:40:18: warning: implicit declaration of function 'strtok'; did you mean 'strtol'? [-Wimplicit-function-declaration]
     char * ptr = strtok((char*)tmp, "x");
                  ^~~~~~
                  strtol
../helpers/byte_converter.c:40:18: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
../helpers/byte_converter.c:45:13: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
         ptr = strtok(NULL, "x");
             ^
[6/227] Preparing syscall dependency handling

[86/227] Performing download step (git clone) for 'trezor-crypto-lib'
Cloning into 'trezor-crypto'...
Already on 'master'
Your branch is up to date with 'origin/master'.
Submodule 'tests/wycheproof' (https://github.com/google/wycheproof) registered for path 'tests/wycheproof'
Cloning into '/Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/thirdparty/trezor-crypto/tests/wycheproof'...
Submodule path 'tests/wycheproof': checked out '2904be69e9d666bf3064fdc15093747e695cfae6'
[125/227] Performing configure step for 'trezor-crypto-lib'
-- The C compiler identification is GNU 7.3.1
-- The CXX compiler identification is AppleClang 9.1.0.9020039
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - no
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Detecting C compile features
-- Detecting C compile features - failed
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/trezor-crypto/src/trezor-crypto-lib-build
[140/227] Performing build step for 'trezor-crypto-lib'
[1/29] Building C object CMakeFiles/trezor-crypto.dir/address.c.o
[2/29] Building C object CMakeFiles/trezor-crypto.dir/base32.c.o
[3/29] Building C object CMakeFiles/trezor-crypto.dir/base58.c.o
[4/29] Building C object CMakeFiles/trezor-crypto.dir/bip39.c.o
[5/29] Building C object CMakeFiles/trezor-crypto.dir/blake256.c.o
[6/29] Building C object CMakeFiles/trezor-crypto.dir/curves.c.o
[7/29] Building C object CMakeFiles/trezor-crypto.dir/bip32.c.o
[8/29] Building C object CMakeFiles/trezor-crypto.dir/cash_addr.c.o
[9/29] Building C object CMakeFiles/trezor-crypto.dir/hasher.c.o
[10/29] Building C object CMakeFiles/trezor-crypto.dir/hmac.c.o
[11/29] Building C object CMakeFiles/trezor-crypto.dir/memzero.c.o
[12/29] Building C object CMakeFiles/trezor-crypto.dir/bignum.c.o
[13/29] Building C object CMakeFiles/trezor-crypto.dir/nist256p1.c.o
[14/29] Building C object CMakeFiles/trezor-crypto.dir/blake2s.c.o
[15/29] Building C object CMakeFiles/trezor-crypto.dir/nem.c.o
[16/29] Building C object CMakeFiles/trezor-crypto.dir/rc4.c.o
[17/29] Building C object CMakeFiles/trezor-crypto.dir/pbkdf2.c.o
[18/29] Building C object CMakeFiles/trezor-crypto.dir/rand.c.o
/Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/thirdparty/trezor-crypto/rand.c:29:9: note: #pragma message: NOT SUITABLE FOR PRODUCTION USE!
 #pragma message("NOT SUITABLE FOR PRODUCTION USE!")
         ^~~~~~~
/Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/thirdparty/trezor-crypto/rand.c: In function 'random32':
/Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/thirdparty/trezor-crypto/rand.c:45:3: warning: implicit declaration of function 'srand' [-Wimplicit-function-declaration]
   srand((unsigned)time(NULL));
   ^~~~~
/Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/thirdparty/trezor-crypto/rand.c:45:19: warning: implicit declaration of function 'time'; did you mean 'true'? [-Wimplicit-function-declaration]
   srand((unsigned)time(NULL));
                   ^~~~
                   true
/Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/thirdparty/trezor-crypto/rand.c:48:11: warning: implicit declaration of function 'rand'; did you mean 'va_end'? [-Wimplicit-function-declaration]
  return ((rand() & 0xFF) | ((rand() & 0xFF) << 8) | ((rand() & 0xFF) << 16) | ((uint32_t) (rand() & 0xFF) << 24));
           ^~~~
           va_end
[19/29] Building C object CMakeFiles/trezor-crypto.dir/rfc6979.c.o
[20/29] Building C object CMakeFiles/trezor-crypto.dir/script.c.o
[21/29] Building C object CMakeFiles/trezor-crypto.dir/secp256k1.c.o
[22/29] Building C object CMakeFiles/trezor-crypto.dir/ecdsa.c.o
[23/29] Building C object CMakeFiles/trezor-crypto.dir/segwit_addr.c.o
[24/29] Building C object CMakeFiles/trezor-crypto.dir/sha3.c.o
[25/29] Building C object CMakeFiles/trezor-crypto.dir/groestl.c.o
[26/29] Building C object CMakeFiles/trezor-crypto.dir/ripemd160.c.o
[27/29] Building C object CMakeFiles/trezor-crypto.dir/sha2.c.o
[28/29] Building C object CMakeFiles/trezor-crypto.dir/blake2b.c.o
[29/29] Linking C static library libtrezor-crypto.a
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: warning for library: libtrezor-crypto.a the table of contents is empty (no object file members in the library define global symbols)
[142/227] Performing install step for 'trezor-crypto-lib'
[0/1] Install the project...
-- Install configuration: ""
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/lib/libtrezor-crypto.a
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: warning for library: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/lib/libtrezor-crypto.a the table of contents is empty (no object file members in the library define global symbols)
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/address.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/base32.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/base58.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/bignum.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/bip32.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/bip39.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/bip39_english.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/blake256.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/blake2_common.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/blake2b.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/blake2s.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/cash_addr.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/check_mem.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/curves.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/ecdsa.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/groestl.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/groestl_internal.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/hasher.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/hmac.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/memzero.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/nem.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/nem_serialize.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/nist256p1.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/options.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/pbkdf2.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/rand.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/rc4.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/rfc6979.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/ripemd160.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/script.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/secp256k1.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/segwit_addr.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/sha2.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/sha3.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/chacha20poly1305/chacha20poly1305.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/chacha20poly1305/ecrypt-config.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/chacha20poly1305/ecrypt-machine.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/chacha20poly1305/ecrypt-portable.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/chacha20poly1305/ecrypt-sync.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/chacha20poly1305/ecrypt-types.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/chacha20poly1305/poly1305-donna-32.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/chacha20poly1305/poly1305-donna.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/chacha20poly1305/rfc7539.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/ed25519-donna/curve25519-donna-32bit.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/ed25519-donna/curve25519-donna-helpers.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/ed25519-donna/curve25519-donna-scalarmult-base.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/ed25519-donna/ed25519-donna-32bit-tables.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/ed25519-donna/ed25519-donna-basepoint-table.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/ed25519-donna/ed25519-donna-impl-base.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/ed25519-donna/ed25519-donna-portable.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/ed25519-donna/ed25519-donna.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/ed25519-donna/ed25519-hash-custom-keccak.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/ed25519-donna/ed25519-hash-custom-sha3.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/ed25519-donna/ed25519-hash-custom.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/ed25519-donna/ed25519-keccak.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/ed25519-donna/ed25519-sha3.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/ed25519-donna/ed25519.h
-- Installing: /Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/include/trezor-crypto/ed25519-donna/modm-donna-32bit.h
[146/227] Building C object CMakeFiles/app.dir/zephyr/compat.c.obj
../zephyr/compat.c: In function 'srand':
../zephyr/compat.c:13:25: warning: unused parameter 'seed' [-Wunused-parameter]
 void srand(unsigned int seed)
                         ^~~~
../zephyr/compat.c: In function 'rand':
../zephyr/compat.c:18:12: warning: implicit declaration of function 'sys_rand32_get' [-Wimplicit-function-declaration]
     return sys_rand32_get();
            ^~~~~~~~~~~~~~
[149/227] Building C object CMakeFiles/app.dir/zephyr/http_utils.c.obj
In file included from /Users/lorenzo/gitHubRepo/zephyr/include/logging/log.h:11:0,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_core.h:52,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:24,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_app.h:44,
                 from ../zephyr/http_utils.c:9:
/Users/lorenzo/gitHubRepo/zephyr/include/logging/log_core.h: In function 'log_printf_arg_checker':
/Users/lorenzo/gitHubRepo/zephyr/include/logging/log_core.h:387:41: warning: unused parameter 'fmt' [-Wunused-parameter]
 void log_printf_arg_checker(const char *fmt, ...)
                                         ^~~
In file included from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_if.h:26:0,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:27,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_app.h:44,
                 from ../zephyr/http_utils.c:9:
/Users/lorenzo/gitHubRepo/zephyr/include/net/hostname.h: In function 'net_hostname_set_postfix':
/Users/lorenzo/gitHubRepo/zephyr/include/net/hostname.h:68:56: warning: unused parameter 'hostname_postfix' [-Wunused-parameter]
 static inline int net_hostname_set_postfix(const u8_t *hostname_postfix,
                                                        ^~~~~~~~~~~~~~~~
/Users/lorenzo/gitHubRepo/zephyr/include/net/hostname.h:69:13: warning: unused parameter 'postfix_len' [-Wunused-parameter]
         int postfix_len)
             ^~~~~~~~~~~
In file included from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:27:0,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_app.h:44,
                 from ../zephyr/http_utils.c:9:
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_if.h: At top level:
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_if.h:456:15: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
 static inline const struct net_l2 * const net_if_l2(struct net_if *iface)
               ^~~~~
In file included from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_app.h:44:0,
                 from ../zephyr/http_utils.c:9:
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h: In function 'net_pkt_set_orig_iface':
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:238:59: warning: unused parameter 'pkt' [-Wunused-parameter]
 static inline void net_pkt_set_orig_iface(struct net_pkt *pkt,
                                                           ^~~
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:239:23: warning: unused parameter 'iface' [-Wunused-parameter]
        struct net_if *iface)
                       ^~~~~
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h: In function 'net_pkt_priority':
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:433:53: warning: unused parameter 'pkt' [-Wunused-parameter]
 static inline u8_t net_pkt_priority(struct net_pkt *pkt)
                                                     ^~~
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h: In function 'net_pkt_vlan_tag':
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:484:54: warning: unused parameter 'pkt' [-Wunused-parameter]
 static inline u16_t net_pkt_vlan_tag(struct net_pkt *pkt)
                                                      ^~~
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h: In function 'net_pkt_vlan_dei':
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:501:53: warning: unused parameter 'pkt' [-Wunused-parameter]
 static inline bool net_pkt_vlan_dei(struct net_pkt *pkt)
                                                     ^~~
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h: In function 'net_pkt_vlan_tci':
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:512:54: warning: unused parameter 'pkt' [-Wunused-parameter]
 static inline u16_t net_pkt_vlan_tci(struct net_pkt *pkt)
                                                      ^~~
../zephyr/http_utils.c: In function 'http_received':
../zephyr/http_utils.c:16:37: warning: unused parameter 'ctx' [-Wunused-parameter]
 void http_received(struct http_ctx *ctx,
                                     ^~~
../zephyr/http_utils.c:19:12: warning: unused parameter 'flags' [-Wunused-parameter]
      u32_t flags,
            ^~~~~
../zephyr/http_utils.c:20:29: warning: unused parameter 'dst' [-Wunused-parameter]
      const struct sockaddr *dst,
                             ^~~
../zephyr/http_utils.c:21:12: warning: unused parameter 'user_data' [-Wunused-parameter]
      void *user_data)
            ^~~~~~~~~
In file included from /Users/lorenzo/gitHubRepo/zephyr/include/logging/log.h:11:0,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_core.h:52,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:24,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_app.h:44,
                 from ../zephyr/http_utils.c:9:
../zephyr/http_utils.c: In function 'do_sync_http_req':
../zephyr/http_utils.c:58:11: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'void *' [-Wformat=]
  NET_INFO("Send %s %x %d", url, (void*)result, sizeof(result));
           ^                     ~~~~~~~~
/Users/lorenzo/gitHubRepo/zephyr/include/logging/log_core.h:208:27: note: in definition of macro '__LOG'
    log_printf_arg_checker(__VA_ARGS__);      \
                           ^~~~~~~~~~~
/Users/lorenzo/gitHubRepo/zephyr/include/logging/log.h:60:24: note: in expansion of macro '_LOG'
 #define LOG_INF(...)   _LOG(LOG_LEVEL_INF, __VA_ARGS__)
                        ^~~~
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_core.h:66:28: note: in expansion of macro 'LOG_INF'
 #define NET_INFO(fmt, ...) LOG_INF(fmt,  ##__VA_ARGS__)
                            ^~~~~~~
../zephyr/http_utils.c:58:2: note: in expansion of macro 'NET_INFO'
  NET_INFO("Send %s %x %d", url, (void*)result, sizeof(result));
  ^~~~~~~~
[151/227] Building C object CMakeFiles/app.dir/zephyr/lwm2m_client.c.obj
In file included from /Users/lorenzo/gitHubRepo/zephyr/include/logging/log.h:11:0,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_core.h:52,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:24,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_app.h:44,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/lwm2m.h:11,
                 from ../zephyr/lwm2m_client.c:9:
/Users/lorenzo/gitHubRepo/zephyr/include/logging/log_core.h: In function 'log_printf_arg_checker':
/Users/lorenzo/gitHubRepo/zephyr/include/logging/log_core.h:387:41: warning: unused parameter 'fmt' [-Wunused-parameter]
 void log_printf_arg_checker(const char *fmt, ...)
                                         ^~~
In file included from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_if.h:26:0,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:27,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_app.h:44,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/lwm2m.h:11,
                 from ../zephyr/lwm2m_client.c:9:
/Users/lorenzo/gitHubRepo/zephyr/include/net/hostname.h: In function 'net_hostname_set_postfix':
/Users/lorenzo/gitHubRepo/zephyr/include/net/hostname.h:68:56: warning: unused parameter 'hostname_postfix' [-Wunused-parameter]
 static inline int net_hostname_set_postfix(const u8_t *hostname_postfix,
                                                        ^~~~~~~~~~~~~~~~
/Users/lorenzo/gitHubRepo/zephyr/include/net/hostname.h:69:13: warning: unused parameter 'postfix_len' [-Wunused-parameter]
         int postfix_len)
             ^~~~~~~~~~~
In file included from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:27:0,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_app.h:44,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/lwm2m.h:11,
                 from ../zephyr/lwm2m_client.c:9:
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_if.h: At top level:
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_if.h:456:15: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
 static inline const struct net_l2 * const net_if_l2(struct net_if *iface)
               ^~~~~
In file included from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_app.h:44:0,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/lwm2m.h:11,
                 from ../zephyr/lwm2m_client.c:9:
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h: In function 'net_pkt_set_orig_iface':
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:238:59: warning: unused parameter 'pkt' [-Wunused-parameter]
 static inline void net_pkt_set_orig_iface(struct net_pkt *pkt,
                                                           ^~~
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:239:23: warning: unused parameter 'iface' [-Wunused-parameter]
        struct net_if *iface)
                       ^~~~~
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h: In function 'net_pkt_priority':
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:433:53: warning: unused parameter 'pkt' [-Wunused-parameter]
 static inline u8_t net_pkt_priority(struct net_pkt *pkt)
                                                     ^~~
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h: In function 'net_pkt_vlan_tag':
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:484:54: warning: unused parameter 'pkt' [-Wunused-parameter]
 static inline u16_t net_pkt_vlan_tag(struct net_pkt *pkt)
                                                      ^~~
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h: In function 'net_pkt_vlan_dei':
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:501:53: warning: unused parameter 'pkt' [-Wunused-parameter]
 static inline bool net_pkt_vlan_dei(struct net_pkt *pkt)
                                                     ^~~
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h: In function 'net_pkt_vlan_tci':
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:512:54: warning: unused parameter 'pkt' [-Wunused-parameter]
 static inline u16_t net_pkt_vlan_tci(struct net_pkt *pkt)
                                                      ^~~
[152/227] Building C object CMakeFiles/app.dir/zephyr/main.c.obj
../zephyr/main.c: In function 'main':
../zephyr/main.c:54:5: warning: implicit declaration of function 'lwm2m_init'; did you mean 'k_sem_init'? [-Wimplicit-function-declaration]
     lwm2m_init();
     ^~~~~~~~~~
     k_sem_init
[154/227] Building C object CMakeFiles/app.dir/zephyr/upload.c.obj
In file included from /Users/lorenzo/gitHubRepo/zephyr/include/logging/log.h:11:0,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/shell/shell.h:16,
                 from ../zephyr/upload.c:10:
/Users/lorenzo/gitHubRepo/zephyr/include/logging/log_core.h: In function 'log_printf_arg_checker':
/Users/lorenzo/gitHubRepo/zephyr/include/logging/log_core.h:387:41: warning: unused parameter 'fmt' [-Wunused-parameter]
 void log_printf_arg_checker(const char *fmt, ...)
                                         ^~~
In file included from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_if.h:26:0,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:27,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_app.h:44,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/http.h:16,
                 from ../zephyr/upload.c:13:
/Users/lorenzo/gitHubRepo/zephyr/include/net/hostname.h: In function 'net_hostname_set_postfix':
/Users/lorenzo/gitHubRepo/zephyr/include/net/hostname.h:68:56: warning: unused parameter 'hostname_postfix' [-Wunused-parameter]
 static inline int net_hostname_set_postfix(const u8_t *hostname_postfix,
                                                        ^~~~~~~~~~~~~~~~
/Users/lorenzo/gitHubRepo/zephyr/include/net/hostname.h:69:13: warning: unused parameter 'postfix_len' [-Wunused-parameter]
         int postfix_len)
             ^~~~~~~~~~~
In file included from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:27:0,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_app.h:44,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/http.h:16,
                 from ../zephyr/upload.c:13:
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_if.h: At top level:
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_if.h:456:15: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
 static inline const struct net_l2 * const net_if_l2(struct net_if *iface)
               ^~~~~
In file included from /Users/lorenzo/gitHubRepo/zephyr/include/net/net_app.h:44:0,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/net/http.h:16,
                 from ../zephyr/upload.c:13:
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h: In function 'net_pkt_set_orig_iface':
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:238:59: warning: unused parameter 'pkt' [-Wunused-parameter]
 static inline void net_pkt_set_orig_iface(struct net_pkt *pkt,
                                                           ^~~
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:239:23: warning: unused parameter 'iface' [-Wunused-parameter]
        struct net_if *iface)
                       ^~~~~
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h: In function 'net_pkt_priority':
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:433:53: warning: unused parameter 'pkt' [-Wunused-parameter]
 static inline u8_t net_pkt_priority(struct net_pkt *pkt)
                                                     ^~~
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h: In function 'net_pkt_vlan_tag':
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:484:54: warning: unused parameter 'pkt' [-Wunused-parameter]
 static inline u16_t net_pkt_vlan_tag(struct net_pkt *pkt)
                                                      ^~~
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h: In function 'net_pkt_vlan_dei':
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:501:53: warning: unused parameter 'pkt' [-Wunused-parameter]
 static inline bool net_pkt_vlan_dei(struct net_pkt *pkt)
                                                     ^~~
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h: In function 'net_pkt_vlan_tci':
/Users/lorenzo/gitHubRepo/zephyr/include/net/net_pkt.h:512:54: warning: unused parameter 'pkt' [-Wunused-parameter]
 static inline u16_t net_pkt_vlan_tci(struct net_pkt *pkt)
                                                      ^~~
At top level:
../zephyr/upload.c:172:12: warning: 'upload_data' defined but not used [-Wunused-function]
 static int upload_data(const struct shell *shell, int argc, char *argv[])
            ^~~~~~~~~~~
[159/227] Building C object eth/CMakeFiles/eth.dir/sign.c.obj
../eth/sign.c: In function 'eth_digest_message':
../eth/sign.c:30:47: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t {aka unsigned int' [-Wformat=]
     snprintf(_data_len, sizeof(_data_len), "%ld", data_len);
                                             ~~^
                                             %d
[161/227] Building C object CMakeFiles/app.dir/zephyr/wallet.c.obj
In file included from /Users/lorenzo/gitHubRepo/zephyr/include/logging/log.h:11:0,
                 from /Users/lorenzo/gitHubRepo/zephyr/include/shell/shell.h:16,
                 from ../zephyr/wallet.c:13:
/Users/lorenzo/gitHubRepo/zephyr/include/logging/log_core.h: In function 'log_printf_arg_checker':
/Users/lorenzo/gitHubRepo/zephyr/include/logging/log_core.h:387:41: warning: unused parameter 'fmt' [-Wunused-parameter]
 void log_printf_arg_checker(const char *fmt, ...)
                                         ^~~
[222/227] Linking C executable zephyr/zephyr_prebuilt.elf
FAILED: zephyr/zephyr_prebuilt.elf 
: && ccache /Users/lorenzo/gcc-arm-none-eabi-7-2018-q2-update/bin/arm-none-eabi-gcc    zephyr/CMakeFiles/zephyr_prebuilt.dir/misc/empty_file.c.obj  -o zephyr/zephyr_prebuilt.elf -L/Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/install/lib -T zephyr/linker.cmd -Wl,-Map=/Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/zephyr/zephyr.map -u_OffsetAbsSyms -u_ConfigAbsSyms -Wl,--whole-archive libapp.a zephyr/libzephyr.a zephyr/arch/arm/core/libarch__arm__core.a zephyr/arch/arm/core/cortex_m/libarch__arm__core__cortex_m.a zephyr/arch/arm/core/cortex_m/mpu/libarch__arm__core__cortex_m__mpu.a zephyr/lib/json/liblib__json.a zephyr/lib/libc/minimal/liblib__libc__minimal.a zephyr/subsys/bluetooth/common/libsubsys__bluetooth__common.a zephyr/subsys/bluetooth/host/libsubsys__bluetooth__host.a zephyr/subsys/bluetooth/controller/libsubsys__bluetooth__controller.a zephyr/subsys/net/libsubsys__net.a zephyr/subsys/net/ip/libsubsys__net__ip.a zephyr/subsys/net/lib/lwm2m/libsubsys__net__lib__lwm2m.a zephyr/subsys/net/lib/config/libsubsys__net__lib__config.a zephyr/subsys/net/lib/http/libsubsys__net__lib__http.a zephyr/drivers/gpio/libdrivers__gpio.a zephyr/drivers/serial/libdrivers__serial.a zephyr/drivers/entropy/libdrivers__entropy.a -Wl,--no-whole-archive zephyr/kernel/libkernel.a zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj -L"/Users/lorenzo/gcc-arm-none-eabi-7-2018-q2-update/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m" -L/Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/zephyr -lgcc -Wl,--print-memory-usage libwallet.a crypto/libcrypto.a eth/libeth.a helpers/libhelpers.a -ltrezor-crypto -nostartfiles -nodefaultlibs -nostdlib -static -no-pie -Wl,-X -Wl,-N -Wl,--gc-sections -Wl,--build-id=none -Wl,--orphan-handling=warn && :
Memory region         Used Size  Region Size  %age Used
           FLASH:      175120 B         1 MB     16.70%
            SRAM:         47 KB       256 KB     18.36%
        IDT_LIST:         120 B         2 KB      5.86eth/libeth.a(address.c.obj): In function `privkey_to_ethereum_address':
/Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/../eth/address.c:23: undefined reference to `ecdsa_get_public_key65'
/Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/../eth/address.c:24: undefined reference to `keccak_256'
/Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/../eth/address.c:27: undefined reference to `secp256k1'
eth/libeth.a(sign.c.obj): In function `eth_digest_message':
/Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/../eth/sign.c:25: undefined reference to `sha3_256_Init'
/Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/../eth/sign.c:27: undefined reference to `sha3_Update'
/Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/../eth/sign.c:31: undefined reference to `sha3_Update'
/Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/../eth/sign.c:33: undefined reference to `sha3_Update'
/Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/../eth/sign.c:35: undefined reference to `keccak_Final'
eth/libeth.a(sign.c.obj): In function `eth_sign':
/Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/../eth/sign.c:48: undefined reference to `ecdsa_sign_digest'
/Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/../eth/sign.c:46: undefined reference to `secp256k1'
eth/libeth.a(sign.c.obj): In function `eth_sign_data_rawsig':
/Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/../eth/sign.c:59: undefined reference to `keccak_256'
/Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/../eth/sign.c:60: undefined reference to `ecdsa_sign_digest'
/Users/lorenzo/gitHubRepo/zephyr/samples/anyledger/anyledger-wallet/build/../eth/sign.c:63: undefined reference to `secp256k1'
collect2: error: ld returned 1 exit status
%
ninja: build stopped: subcommand failed.

create zephyr QEMU build

Our build is at the moment specific to nRF52x board. It would be nice to have a generic build that can be tested on the local machine.

  • update main.c so it is usable with both -DBOARD=qemu_x86 and -DBOARD=nrf52840_pca10056

eth module: `eth_sign()`

Create function
int eth_sign(const privkey_t *pk, const uint8_t *data, size_t data_size, signature_t *sig_out)

Params:

  • const privkey_t *pk - private key
  • uint8_t *data - data to sign
  • size_t *data_size - size of the data buffer
  • signature_t *sig_out - result

Return value:

  • 0 - success
  • -1 - error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.