Skip to content

Commit 37d09ce

Browse files
author
Clément Léger
committed
Better README with new functioinnality
1 parent ddf40fd commit 37d09ce

File tree

1 file changed

+58
-2
lines changed

1 file changed

+58
-2
lines changed

README.md

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,30 @@ This work is absolutely **not related** to cypress in any way.
66
## Introduction
77

88
This repository holds an attempt to port some tools of cypress under Linux.
9-
The host bootloader has been replicating using cypress source code for host bootloader.
9+
It allows to compile and upload application to some cypress boards.
1010
It has only been successfully tested with a CY8CKIT-049 42xx kit.
1111
(http://www.cypress.com/documentation/development-kitsboards/psoc-4-cy8ckit-049-4xxx-prototyping-kits)
1212

1313
The prerequisites are the following:
1414
- `gengetopt`
1515
- `make`
16+
- `wine` (to run cyelftool when using makefile)
17+
- An arm toolchain (arm-none-eabi-)
18+
19+
In order to build and install these utilities:
1620

21+
```
22+
make all
23+
sudo make install
24+
```
1725

1826
## Host bootloader
1927

28+
The host bootloader has been replicating using cypress source code for host bootloader.
2029
The Cypress Host Bootloader Tool is available as a command line utility and support various command
2130
To build it, the `make` command should be sufficient.
2231

23-
## Usage
32+
### Usage
2433

2534
```
2635
-h, --help Print help and exit
@@ -37,3 +46,50 @@ To build it, the `make` command should be sufficient.
3746
-e, --erase Erase memory
3847
-v, --verify Verify file
3948
```
49+
50+
## iHex to cyacd format
51+
52+
Thanks from https://github.com/gv1/hex2cyacd, the format is well explained and it was possible to write a C tool.
53+
ihex2cyacd is a an utility to create cyacd files from ihex files.
54+
In order to use it, the simplest way is to use it
55+
56+
### Usage
57+
58+
```
59+
60+
-h, --help Print help and exit
61+
-V, --version Print version and exit
62+
-i, --input=STRING Input ihex file
63+
-b, --bootloader_size=INT Bootloader text size file
64+
-o, --output=STRING Output cyacd file
65+
-c, --cpu=ENUM CPU type (possible values="CY8C41", "CY8C42"
66+
default=`CY8C42')
67+
```
68+
69+
## Makefiles
70+
71+
A Makefile.cypress file is available in the repository in order to easily compile cydsn projects.
72+
Two variable are required to be set which are PSOC_CREATOR_DIR and PROJECT_DIR.
73+
The easiest way to use it is to create a Makefile with the following content
74+
75+
```
76+
PSOC_CREATOR_DIR := Path_to_PSoC_Creator
77+
PROJECT_DIR := Path_to_project.cydsn
78+
79+
include Makefile.cypress
80+
81+
```
82+
83+
Then type `make` to compile the application.
84+
Note that some old generated files may be outdated and can't compile.
85+
This typically happens when you change the name of a PSoC component and rebuild the application.
86+
Simply remove these files in order to compile again.
87+
88+
The output files will be in the `build` directory.
89+
The final cyacd file can be flashed using `cyhostboot`.
90+
91+
92+
## Notes
93+
94+
The `cyelftool` cypress utility has not yet been reversed.
95+
However thanks to wine, this utility can be used and

0 commit comments

Comments
 (0)