-
Notifications
You must be signed in to change notification settings - Fork 72
/
README.hacking
103 lines (68 loc) · 2.89 KB
/
README.hacking
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
This document describes things required to get started with frankenstein development.
You'll need a PC running some flavor of linux (preferably). Mac OS X, windows (cygwin) are untested,
so you're on your own.
First of all, get the following from your repositories:
* git
* make, gcc
* flex, bison, gperf
For debian/ubuntu:
apt-get install build-essential git flex bison gperf
For Arch:
sudo pacman -S git flex bison gperf
Now grab and unpack latest kconfig-frontends from
http://ymorin.is-a-geek.org/projects/kconfig-frontends
This is normally installed by:
cd kconfig-frontends
./bootstrap
./configure --prefix=/usr
make
sudo make install
To build from git instead:
git clone http://ymorin.is-a-geek.org/git/kconfig-frontends/
cd kconfig-frontends
./bootstrap
./configure --prefix=/usr
make
sudo make install
Now, we'll need our toolchain. we'll need the awesome esp-open-sdk created by pfalcon:
https://github.com/pfalcon/esp-open-sdk
We'll need to build it in STANDALONE mode. Check the README for compatibility notices, check the
esp-open-sdk Makefile to see what version you are compiling against. The build takes about an hour
on my box. Normally you can just run:
git clone https://github.com/pfalcon/esp-open-sdk.git
cd esp-open-sdk
make STANDALONE=y
And go grab a cup of coffee.
Once the build is done, you'll have esp-open-sdk/xtensa-lx106-elf directory. You can tarball
it for use on other boxes - it's a portable static toolchain that will run on any linux pc.
To activate it - xtensa-lx106-elf/bin directory to your PATH.
e.g.
export PATH=$PATH:/path/to/xtensa-lx106-elf/bin
We're through with toolchain installation, time for frankenstein.
Clone it from github:
git clone https://github.com/nekromant/esp8266-frankenstein.git
cd esp8266-frankenstein
make
Frankenstein makefile will fetch antares for you. Antares is the buildsystem for embedded projects
it uses internally. You'll now have antares experimental branch cloned in ./antares.
If you have a global antares installation - make sure you have checked out experimental branch.
master has no esp8266 support at the time of writing.
Now we need to configure frankenstein.
make defconfig
Provides you with a more or less sane default config.
make menuconfig/nconfig/xconfig/etc.
Bring up the configuration menu.
run make again to build frankenstein.
make menuconfig (or nconfig, whatever) opens up a menu with possible options.
Places of interest are:
"Target platform settings"
There's a switch that allows you to place all code into IROM by default, without specifying
ICACHE_FLASH_ATTR. It should be active by default.
If you want to explicitly place some function in RAM - use:
void attribute((section(".iram0.text"))) func()
{
/* code */
}
Project settings. All stuff from kcnf at the top level shows up here.
Here you can select witch parts of frankenstein will be build, set up environment address and
lengths, etc.