Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Upgrade to v1.3.2 #4

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
7c6856b
Merge commit '1a14efd2d576d8e76abd69e680c333d09d0c2c9f' into HEAD
jleni Mar 13, 2019
1a14efd
Squashed 'deps/ledger-zxlib/' changes from 3fe2ebd..7fa3624
jleni Mar 13, 2019
8e7376a
Merge commit 'c1ae8009048c94a779fc2bb05099521b6498e5a1' into fix/utf8
jleni Mar 13, 2019
c1ae800
Squashed 'deps/ledger-zxlib/' changes from 7fa3624..3d2cc6e
jleni Mar 13, 2019
e4efdd2
Use zxlib asciify before sending to BAGL
jleni Mar 13, 2019
c2ae58a
Merge pull request #6 from ZondaX/fix/utf8
jleni Mar 13, 2019
a5f8d71
update docs+ bump to 1.1.2
jleni Mar 14, 2019
102e6d6
Update README.md
jleni Mar 14, 2019
0149bcb
Changing app name to lowercase
jleni Mar 20, 2019
60caf9e
Merge pull request #7 from ZondaX/app_name
jleni Mar 20, 2019
ab2aac4
indicate if the device is locked (screensaver)
jleni Mar 20, 2019
2f814fc
Merge pull request #8 from ZondaX/locking
jleni Mar 20, 2019
4d3896b
big UI refactoring
jleni Mar 21, 2019
3b59fb4
fixes + return pubkey+addr
jleni Mar 21, 2019
0ddf265
Updating docs + deprecating old API
jleni Mar 21, 2019
34da81f
improving error messages
jleni Mar 25, 2019
e875504
temporarily enabling for backward compatibility
jleni Mar 25, 2019
b4e6a55
Merge pull request #9 from ZondaX/fix/getAddr
jleni Mar 25, 2019
c895522
invalid call
jleni Mar 26, 2019
d14bab3
Merge pull request #10 from ZondaX/fix
jleni Mar 26, 2019
e55e6fe
Bumping up to 1.3.1
jleni Mar 26, 2019
226860b
Merge pull request #11 from ZondaX/v1.3.1
jleni Mar 26, 2019
6a0d221
Revert "invalid call"
jleni Mar 26, 2019
0fa1582
refactoring stack usage
jleni Apr 1, 2019
edf17d9
parser refactoring
jleni Apr 2, 2019
64b655d
refactoring 2
jleni Apr 2, 2019
30481ec
refactoring 3
jleni Apr 2, 2019
8147645
set recursion depth
jleni Apr 2, 2019
d64ccd2
bump version to 1.3.2
jleni Apr 2, 2019
9e90bd9
Merge pull request #12 from ZondaX/fix/stack_usage
jleni Apr 2, 2019
728c5d7
improving memory usage
jleni Apr 4, 2019
afb9110
Merge pull request #13 from ZondaX/parser
jleni Apr 4, 2019
36fb5cb
Squashed 'deps/ledger-zxlib/' changes from 3d2cc6e..1b8b084
jleni Apr 19, 2019
80e5693
Merge commit '36fb5cbeff8632a9d77096250b7fdb34fdeaf338' into newui
jleni Apr 19, 2019
f81404b
Improved generic UI
jleni Apr 19, 2019
be2c558
Merge pull request #14 from ZondaX/newui
jleni Apr 19, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,7 @@ debug/app\.asm
bin/app\.hex

bin/app\.elf

src/glyphs\.h

src/glyphs\.c
75 changes: 50 additions & 25 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,51 +19,76 @@
ifeq ($(BOLOS_SDK),)
$(error BOLOS_SDK is not set)
endif
include $(BOLOS_SDK)/Makefile.defines

# Main app configuration
APPNAME = "Cosmos"
APPVERSION_M=1
APPVERSION_N=5
APPVERSION_P=0

dummy_submodules := $(shell git submodule update --init --recursive)
APP_LOAD_PARAMS = --appFlags 0x200 --delete $(COMMON_LOAD_PARAMS) --path "44'/118'"

ifeq ($(TARGET_NAME),TARGET_NANOS)
SCRIPT_LD:=$(CURDIR)/script.ld
ICONNAME:=$(CURDIR)/nanos_icon.gif
endif

include $(BOLOS_SDK)/Makefile.defines
ifeq ($(TARGET_NAME),TARGET_NANOX)
ICONNAME:=$(CURDIR)/nanox_icon.gif
endif

# Main app configuration
APPNAME = "COSMOS"
APPVERSION_M=1
APPVERSION_N=1
APPVERSION_P=1
ifndef ICONNAME
$(error ICONNAME is not set)
endif

APP_LOAD_PARAMS = --appFlags 0x00 --delete $(COMMON_LOAD_PARAMS) --path "44'/118'"
ICONNAME=$(CURDIR)/icon.gif
all: default

############
# Platform

DEFINES += UNUSED\(x\)=\(void\)x
DEFINES += PRINTF\(...\)=

APPVERSION=$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)
DEFINES += APPVERSION=\"$(APPVERSION)\"

DEFINES += OS_IO_SEPROXYHAL IO_SEPROXYHAL_BUFFER_SIZE_B=128
DEFINES += HAVE_IO_USB HAVE_L4_USBLIB IO_USB_MAX_ENDPOINTS=7 IO_HID_EP_LENGTH=64 HAVE_USB_APDU

DEFINES += OS_IO_SEPROXYHAL
DEFINES += HAVE_BAGL HAVE_SPRINTF
DEFINES += PRINTF\(...\)=
DEFINES += HAVE_IO_USB HAVE_L4_USBLIB IO_USB_MAX_ENDPOINTS=7 IO_HID_EP_LENGTH=64 HAVE_USB_APDU

DEFINES += LEDGER_MAJOR_VERSION=$(APPVERSION_M) LEDGER_MINOR_VERSION=$(APPVERSION_N) LEDGER_PATCH_VERSION=$(APPVERSION_P)

SDK_SOURCE_PATH += lib_u2f
DEFINES += HAVE_U2F HAVE_IO_U2F
DEFINES += USB_SEGMENT_SIZE=64
DEFINES += U2F_PROXY_MAGIC=\"CSM\"
DEFINES += USB_SEGMENT_SIZE=64
DEFINES += U2F_MAX_MESSAGE_SIZE=264 #257+5+2

DEFINES += HAVE_BOLOS_APP_STACK_CANARY
DEFINES += LEDGER_SPECIFIC

ifeq ($(TARGET_NAME),TARGET_NANOX)
DEFINES += IO_SEPROXYHAL_BUFFER_SIZE_B=300

DEFINES += HAVE_GLO096
DEFINES += HAVE_BAGL BAGL_WIDTH=128 BAGL_HEIGHT=64
DEFINES += HAVE_BAGL_ELLIPSIS # long label truncation feature
DEFINES += HAVE_BAGL_FONT_OPEN_SANS_REGULAR_11PX
DEFINES += HAVE_BAGL_FONT_OPEN_SANS_EXTRABOLD_11PX
DEFINES += HAVE_BAGL_FONT_OPEN_SANS_LIGHT_16PX

DEFINES += HAVE_UX_FLOW

#SDK_SOURCE_PATH += lib_blewbxx lib_blewbxx_impl
SDK_SOURCE_PATH += lib_ux
else
# Assume Nano S
DEFINES += IO_SEPROXYHAL_BUFFER_SIZE_B=128
endif

# X specific

#Feature temporarily disabled
DEFINES += LEDGER_SPECIFIC
#DEFINES += TESTING_ENABLED
#DEFINES += FEATURE_ED25519

# Compiler, assembler, and linker

Expand Down Expand Up @@ -92,17 +117,19 @@ AS := $(GCCPATH)arm-none-eabi-gcc
AFLAGS +=

LD := $(GCCPATH)arm-none-eabi-gcc
LDFLAGS += -O3 -s
LDFLAGS += -O3 -Os
LDLIBS += -lm -lgcc -lc

##########################
include $(BOLOS_SDK)/Makefile.glyphs

APP_SOURCE_PATH += src deps/jsmn/src deps/ledger-zxlib/include deps/ledger-zxlib/src
SDK_SOURCE_PATH += lib_stusb lib_u2f lib_stusb_impl

#include $(BOLOS_SDK)/Makefile.glyphs

all: default
ifeq ($(TARGET_NAME),TARGET_NANOX)
#SDK_SOURCE_PATH += lib_blewbxx lib_blewbxx_impl
SDK_SOURCE_PATH += lib_ux
endif

load:
python -m ledgerblue.loadApp $(APP_LOAD_PARAMS)
Expand All @@ -114,12 +141,10 @@ package:
./pkgdemo.sh ${APPNAME} ${APPVERSION} ${ICONNAME}

# Import generic rules from the SDK

include $(BOLOS_SDK)/Makefile.rules

#add dependency on custom makefile filename
dep/%.d: %.c Makefile.genericwallet

dep/%.d: %.c Makefile

listvariants:
@echo VARIANTS COIN cosmos
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

This is a submodule that only contains the user app according to Ledger specs.

Please refer to the [Ledger-Cosmos](https://github.com/cosmos/ledger-cosmos) for the complete source code (unit tests, integration tests, documentation, etc.)
Please refer to the [Ledger-Cosmos](https://github.com/cosmos/ledger-cosmos) for the complete source code, build instructions, etc. (unit tests, integration tests, documentation, etc.)
12 changes: 12 additions & 0 deletions deps/ledger-zxlib/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# top-most EditorConfig file
root = true

[*]
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
insert_final_newline = true

[*.{c,h,cpp,hpp}]
indent_style = space
indent_size = 4
Loading