Skip to content

Commit 1d29a8a

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 3d79574 + 858595d commit 1d29a8a

422 files changed

Lines changed: 59418 additions & 102 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ build/Release
2626
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
2727
node_modules
2828

29-
*~
29+
*~
30+
.DS_Store

README.md

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
Hackea la MiniBlip, repo para el hackatón CircoLab/BQ/Miniblip
44

5+
Puedes ver este contenido en versión [web](http://hack-miniblip.github.io/).
6+
57
La [miniblip es](https://github.com/bqlabs/miniBLIP) una placa creada
68
por [BQ](http://github.com/bqlabs) para *wearables* y lo que
79
surja. Tiene dos botones, 5 botones capacitivos y un array de
8-
leds. Está basada en un ARM Cortex-M0 a 48MHz. Incluye 32KB FLASH, 8KB RAM
10+
leds. Está basada en un ARM Cortex-M0 a 48MHz, el LPC11U24 que incluye 32KB FLASH y 8KB RAM y funciona a 48MHz ([más detalles](https://developer.mbed.org/platforms/mbed-LPC11U24/#features))
911

1012
## Cómo comenzar
1113

@@ -52,11 +54,11 @@ fichero.
5254
3. Finalmente, desmontamos la miniblip, bien con el entorno gráfico o con terminal
5355

5456
```
55-
umount /deb/sbd
56-
```
57+
umount /dev/sdb
5758
58-
Usando el script [miniblip_loader](miniblip_loader.sh) podemos cargar nuestros programas automáticamente
59+
```
5960

61+
Usando el script [miniblip_loader](Scripts/miniblip_loader.sh) podemos cargar nuestros programas automáticamente
6062
```shell
6163
$ miniblip_loader.sh + [firmware.bin]`
6264
```
@@ -68,6 +70,10 @@ Usando el script [miniblip_loader](miniblip_loader.sh) podemos cargar nuestros p
6870
Al conectar de nuevo el sistema empezará a funcionar el nuevo
6971
programa.
7072

73+
## Binarios
74+
75+
Puedes ver los binarios en [este repositorio](https://github.com/hack-miniblip/apps/). Si quieres subir el tuyo propio, haz un *fork*, [incorpora tu binario siguiendo las instrucciones](https://github.com/hack-miniblip/apps/blob/master/README.md) y haz un pull request.
76+
7177
## Para añadir a este repo
7278

7379
Hacer un fork. Una vez hecho
@@ -86,3 +92,35 @@ Podéis hacer un pull request a este repo o un simple enlace a este README.
8692

8793
[Cookbook](cookbook.md) con cosillas
8894

95+
## Compilándolo en local
96+
97+
Te puedes descargar el programa completo del entorno pulsando con el botón de la derecha y dándole a "Export program".
98+
99+
Instálate el entorno de programación siguiendo [estas instrucciones](https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded)
100+
101+
Descomprime el .zip que te bajes en un fichero. Edita el `Makefile` y edita esta línea para poner
102+
103+
GCC_BIN = /usr/bin/
104+
105+
que es donde se instala el compilador.
106+
107+
Puede que te dé algún problema del estilo
108+
109+
```
110+
/usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld: colorines.elf section `.text' will not fit in region `FLASH'
111+
/usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld: region `FLASH' overflowed by 208 bytes
112+
```
113+
114+
En cuyo caso tendrás que recortar el tamaño del fichero, quitando variables e info de depuración, por ejemplo.
115+
116+
Si no te da ningún problema, te generará un `.bin`. Ya casi estás. Tendrás que pillarte el [programa `crcset.c`](Scripts/crcset.c) y compilarlo. Este programa pone los bits de comprobación correctamente, para evitar el error que sale al final:
117+
118+
*****
119+
***** You must modify vector checksum value in *.bin and *.hex files.
120+
*****
121+
122+
Con eso, ya haces
123+
124+
./crcset nombre-del-programa.bin
125+
126+
¡Y ya estás listo!

Scripts/crcset.c

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#include <stdio.h>
2+
#include <unistd.h>
3+
#include <sys/types.h>
4+
#include <sys/stat.h>
5+
#include <fcntl.h>
6+
7+
int main(int argc, char **argv) {
8+
int fw, count, crc;
9+
char buf[28];
10+
11+
fw = open(argv[1], O_RDWR);
12+
// read fist 28 bytes
13+
read(fw, &buf, 28);
14+
15+
// find 2's complement of entries 0 to 6
16+
for (count=0, crc=0; count < 7; count++) {
17+
crc += *((int*)(buf+count*4));
18+
}
19+
crc = (~crc) + 1;
20+
21+
// write it at offset 0x0000001C
22+
lseek(fw, 0x0000001C, SEEK_SET);
23+
write(fw, &crc, 4);
24+
close(fw);
25+
26+
return 0;
27+
}

Scripts/miniblip_loader.sh

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ else
1212
then
1313
port=$(mount | grep "MINIBLIP" | grep -Eo "^[^ ]+");
1414
fi
15-
15+
1616
if [ "$port" == "" ]
1717
then
1818
echo "Not mounted"
1919
else
20-
sudo dd if=$1 of=$port bs=512 seek=4 conv=notrunc
20+
sudo dd if="$1" of=$port bs=512 seek=4 conv=notrunc
2121
sudo umount $port
2222
fi
2323
fi

assets/css/ie8.css

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
/*
2+
Landed by HTML5 UP
3+
html5up.net | @n33co
4+
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
5+
*/
6+
7+
/* Basic */
8+
9+
body {
10+
color: #ffffff;
11+
}
12+
13+
body, html, #page-wrapper {
14+
height: 100%;
15+
}
16+
17+
blockquote {
18+
border-left: solid 4px #606067;
19+
}
20+
21+
code {
22+
background: #32333b;
23+
}
24+
25+
hr {
26+
border-bottom: solid 1px #606067;
27+
}
28+
29+
/* Icon */
30+
31+
.icon.major {
32+
-ms-behavior: url("assets/js/ie/PIE.htc");
33+
}
34+
35+
/* Image */
36+
37+
.image {
38+
position: relative;
39+
-ms-behavior: url("assets/js/ie/PIE.htc");
40+
}
41+
42+
.image:before {
43+
display: none;
44+
}
45+
46+
.image img {
47+
position: relative;
48+
-ms-behavior: url("assets/js/ie/PIE.htc");
49+
}
50+
51+
/* Form */
52+
53+
input[type="text"],
54+
input[type="password"],
55+
input[type="email"],
56+
select,
57+
textarea {
58+
position: relative;
59+
-ms-behavior: url("assets/js/ie/PIE.htc");
60+
}
61+
62+
input[type="text"]:focus,
63+
input[type="password"]:focus,
64+
input[type="email"]:focus,
65+
select:focus,
66+
textarea:focus {
67+
-ms-behavior: url("assets/js/ie/PIE.htc");
68+
}
69+
70+
input[type="text"],
71+
input[type="password"],
72+
input[type="email"] {
73+
line-height: 3em;
74+
}
75+
76+
input[type="checkbox"],
77+
input[type="radio"] {
78+
font-size: 3em;
79+
}
80+
81+
input[type="checkbox"] + label:before,
82+
input[type="radio"] + label:before {
83+
display: none;
84+
}
85+
86+
/* Table */
87+
88+
table tbody tr {
89+
border: solid 1px #606067;
90+
}
91+
92+
table thead {
93+
border-bottom: solid 1px #606067;
94+
}
95+
96+
table tfoot {
97+
border-top: solid 1px #606067;
98+
}
99+
100+
table.alt tbody tr td {
101+
border: solid 1px #606067;
102+
}
103+
104+
/* Button */
105+
106+
input[type="submit"],
107+
input[type="reset"],
108+
input[type="button"],
109+
.button {
110+
border: solid 1px #ffffff !important;
111+
}
112+
113+
input[type="submit"].special,
114+
input[type="reset"].special,
115+
input[type="button"].special,
116+
.button.special {
117+
border: 0 !important;
118+
}
119+
120+
/* Goto Next */
121+
122+
.goto-next {
123+
display: none;
124+
}
125+
126+
/* Spotlight */
127+
128+
.spotlight {
129+
height: 100%;
130+
}
131+
132+
.spotlight .content {
133+
background: #272833;
134+
}
135+
136+
/* Wrapper */
137+
138+
.wrapper.style2 input[type="text"]:focus,
139+
.wrapper.style2 input[type="password"]:focus,
140+
.wrapper.style2 input[type="email"]:focus,
141+
.wrapper.style2 select:focus,
142+
.wrapper.style2 textarea:focus {
143+
border-color: #ffffff;
144+
}
145+
146+
.wrapper.style2 input[type="submit"].special:hover, .wrapper.style2 input[type="submit"].special:active,
147+
.wrapper.style2 input[type="reset"].special:hover,
148+
.wrapper.style2 input[type="reset"].special:active,
149+
.wrapper.style2 input[type="button"].special:hover,
150+
.wrapper.style2 input[type="button"].special:active,
151+
.wrapper.style2 .button.special:hover,
152+
.wrapper.style2 .button.special:active {
153+
color: #e44c65 !important;
154+
}
155+
156+
/* Dropotron */
157+
158+
.dropotron {
159+
background: #272833;
160+
box-shadow: none !important;
161+
-ms-behavior: url("assets/js/ie/PIE.htc");
162+
}
163+
164+
.dropotron > li a, .dropotron > li span {
165+
color: #ffffff !important;
166+
}
167+
168+
.dropotron.level-0 {
169+
margin-top: 0;
170+
}
171+
172+
.dropotron.level-0:before {
173+
display: none;
174+
}
175+
176+
/* Header */
177+
178+
#header {
179+
background: #272833;
180+
}
181+
182+
/* Banner */
183+
184+
#banner {
185+
height: 100%;
186+
}
187+
188+
#banner:before {
189+
height: 100%;
190+
}
191+
192+
#banner:after {
193+
background-image: url("images/ie/banner-overlay.png");
194+
}

assets/css/ie9.css

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
Landed by HTML5 UP
3+
html5up.net | @n33co
4+
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
5+
*/
6+
7+
/* Loader */
8+
9+
body.landing:before, body.landing:after {
10+
display: none !important;
11+
}
12+
13+
/* Icon */
14+
15+
.icon.alt {
16+
color: inherit !important;
17+
}
18+
19+
.icon.major.alt:before {
20+
color: #ffffff !important;
21+
}
22+
23+
/* Banner */
24+
25+
#banner:after {
26+
background-color: rgba(23, 24, 32, 0.95);
27+
}
28+
29+
/* Footer */
30+
31+
#footer .icons .icon.alt:before {
32+
color: #ffffff !important;
33+
}

assets/css/images/arrow.svg

Lines changed: 5 additions & 0 deletions
Loading
113 Bytes
Loading

assets/css/images/overlay.png

17.3 KB
Loading

0 commit comments

Comments
 (0)