Skip to content

Commit cd9e17d

Browse files
2 parents 58a5799 + 6d18be6 commit cd9e17d

11 files changed

Lines changed: 120 additions & 102 deletions

File tree

STM32F1/boards.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ menu.bootloader_version=Bootloader version
66
menu.upload_method=Upload method
77

88
##############################################################
9-
mapleMini.name=LeafLabs Maple Mini Rev 2 to Flash
9+
mapleMini.name=Maple Mini
1010

1111
mapleMini.build.board=MAPLE_MINI
1212
mapleMini.build.core=maple
@@ -37,7 +37,7 @@ mapleMini.menu.bootloader_version.bootloader20.upload.maximum_size=122880
3737
mapleMini.menu.bootloader_version.bootloader20.upload.altID=2
3838

3939
##############################################################
40-
maple.name=LeafLabs Maple Rev 3+ to Flash
40+
maple.name=Maple (Rev 3)
4141

4242
maple.upload.tool=maple_upload
4343
maple.upload.protocol=maple_dfu
@@ -60,7 +60,7 @@ maple.build.vect=VECT_TAB_ADDR=0x8005000
6060

6161

6262
##############################################################
63-
mapleRET6.name=LeafLabs Maple RET6 to Flash
63+
mapleRET6.name=Maple (RET6)
6464

6565
mapleRET6.build.board=MAPLE_RET6
6666
mapleRET6.build.core=maple

STM32F1/cores/maple/libmaple/timer.c

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
/******************************************************************************
23
* The MIT License
34
*
@@ -410,3 +411,102 @@ static void enable_bas_gen_irq(timer_dev *dev) {
410411
}
411412
nvic_irq_enable(irq_num);
412413
}
414+
415+
416+
/* Note.
417+
*
418+
* 2015/07/06 Roger Clark
419+
*
420+
* The IRQ handlers were initially in timer_f1.c however this seems to cause problems
421+
* in which the compiler / linker doesn't always link all the required handlers.
422+
* The work around was to move the handlers into this file
423+
*/
424+
425+
/*
426+
* IRQ handlers
427+
*
428+
* Defer to the timer_private dispatch API.
429+
*
430+
* FIXME: The names of these handlers are inaccurate since XL-density
431+
* devices came out. Update these to match the STM32F2 names, maybe
432+
* using some weak symbol magic to preserve backwards compatibility if
433+
* possible. Once that's done, we can just move the IRQ handlers into
434+
* the top-level libmaple/timer.c, and there will be no need for this
435+
* file.
436+
*/
437+
438+
void __irq_tim1_brk(void) {
439+
dispatch_adv_brk(TIMER1);
440+
#if STM32_HAVE_TIMER(9)
441+
dispatch_tim_9_12(TIMER9);
442+
#endif
443+
}
444+
445+
void __irq_tim1_up(void) {
446+
dispatch_adv_up(TIMER1);
447+
#if STM32_HAVE_TIMER(10)
448+
dispatch_tim_10_11_13_14(TIMER10);
449+
#endif
450+
}
451+
452+
void __irq_tim1_trg_com(void) {
453+
dispatch_adv_trg_com(TIMER1);
454+
#if STM32_HAVE_TIMER(11)
455+
dispatch_tim_10_11_13_14(TIMER11);
456+
#endif
457+
}
458+
459+
void __irq_tim1_cc(void) {
460+
dispatch_adv_cc(TIMER1);
461+
}
462+
463+
void __irq_tim2(void) {
464+
dispatch_general(TIMER2);
465+
}
466+
467+
void __irq_tim3(void) {
468+
dispatch_general(TIMER3);
469+
}
470+
471+
void __irq_tim4(void) {
472+
dispatch_general(TIMER4);
473+
}
474+
475+
#if defined(STM32_HIGH_DENSITY) || defined(STM32_XL_DENSITY)
476+
void __irq_tim5(void) {
477+
dispatch_general(TIMER5);
478+
}
479+
480+
void __irq_tim6(void) {
481+
dispatch_basic(TIMER6);
482+
}
483+
484+
void __irq_tim7(void) {
485+
dispatch_basic(TIMER7);
486+
}
487+
488+
void __irq_tim8_brk(void) {
489+
dispatch_adv_brk(TIMER8);
490+
#if STM32_HAVE_TIMER(12)
491+
dispatch_tim_9_12(TIMER12);
492+
#endif
493+
}
494+
495+
void __irq_tim8_up(void) {
496+
dispatch_adv_up(TIMER8);
497+
#if STM32_HAVE_TIMER(13)
498+
dispatch_tim_10_11_13_14(TIMER13);
499+
#endif
500+
}
501+
502+
void __irq_tim8_trg_com(void) {
503+
dispatch_adv_trg_com(TIMER8);
504+
#if STM32_HAVE_TIMER(14)
505+
dispatch_tim_10_11_13_14(TIMER14);
506+
#endif
507+
}
508+
509+
void __irq_tim8_cc(void) {
510+
dispatch_adv_cc(TIMER8);
511+
}
512+
#endif /* defined(STM32_HIGH_DENSITY) || defined(STM32_XL_DENSITY) */

STM32F1/cores/maple/libmaple/timer_f1.c

Lines changed: 6 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -30,95 +30,12 @@
3030
* @brief STM32F1 timer.
3131
*/
3232

33-
#include <libmaple/timer.h>
34-
#include <libmaple/stm32.h>
35-
#include "timer_private.h"
36-
3733
/*
38-
* IRQ handlers
39-
*
40-
* Defer to the timer_private dispatch API.
41-
*
42-
* FIXME: The names of these handlers are inaccurate since XL-density
43-
* devices came out. Update these to match the STM32F2 names, maybe
44-
* using some weak symbol magic to preserve backwards compatibility if
45-
* possible. Once that's done, we can just move the IRQ handlers into
46-
* the top-level libmaple/timer.c, and there will be no need for this
47-
* file.
34+
* 2015/07/06
35+
* Note. The IRQ handlers which were initially in this file have been moved to timer.c
36+
* to resolve a linker issue in where some IRQ handlers were not being linked even though
37+
* they were being used.
38+
* This file has been retains for historical reasons, but can be moved at some time in the future
39+
* when full testing of the code in the new location has been completed.
4840
*/
4941

50-
void __irq_tim1_brk(void) {
51-
dispatch_adv_brk(TIMER1);
52-
#if STM32_HAVE_TIMER(9)
53-
dispatch_tim_9_12(TIMER9);
54-
#endif
55-
}
56-
57-
void __irq_tim1_up(void) {
58-
dispatch_adv_up(TIMER1);
59-
#if STM32_HAVE_TIMER(10)
60-
dispatch_tim_10_11_13_14(TIMER10);
61-
#endif
62-
}
63-
64-
void __irq_tim1_trg_com(void) {
65-
dispatch_adv_trg_com(TIMER1);
66-
#if STM32_HAVE_TIMER(11)
67-
dispatch_tim_10_11_13_14(TIMER11);
68-
#endif
69-
}
70-
71-
void __irq_tim1_cc(void) {
72-
dispatch_adv_cc(TIMER1);
73-
}
74-
75-
void __irq_tim2(void) {
76-
dispatch_general(TIMER2);
77-
}
78-
79-
void __irq_tim3(void) {
80-
dispatch_general(TIMER3);
81-
}
82-
83-
void __irq_tim4(void) {
84-
dispatch_general(TIMER4);
85-
}
86-
87-
#if defined(STM32_HIGH_DENSITY) || defined(STM32_XL_DENSITY)
88-
void __irq_tim5(void) {
89-
dispatch_general(TIMER5);
90-
}
91-
92-
void __irq_tim6(void) {
93-
dispatch_basic(TIMER6);
94-
}
95-
96-
void __irq_tim7(void) {
97-
dispatch_basic(TIMER7);
98-
}
99-
100-
void __irq_tim8_brk(void) {
101-
dispatch_adv_brk(TIMER8);
102-
#if STM32_HAVE_TIMER(12)
103-
dispatch_tim_9_12(TIMER12);
104-
#endif
105-
}
106-
107-
void __irq_tim8_up(void) {
108-
dispatch_adv_up(TIMER8);
109-
#if STM32_HAVE_TIMER(13)
110-
dispatch_tim_10_11_13_14(TIMER13);
111-
#endif
112-
}
113-
114-
void __irq_tim8_trg_com(void) {
115-
dispatch_adv_trg_com(TIMER8);
116-
#if STM32_HAVE_TIMER(14)
117-
dispatch_tim_10_11_13_14(TIMER14);
118-
#endif
119-
}
120-
121-
void __irq_tim8_cc(void) {
122-
dispatch_adv_cc(TIMER8);
123-
}
124-
#endif /* defined(STM32_HIGH_DENSITY) || defined(STM32_XL_DENSITY) */

STM32F1/cores/maple/wirish.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,12 @@
7474

7575
#include <stdint.h>
7676

77-
#warning these are just here to get SPI to compile they need to be changed and moved!
78-
#define SS (1)
79-
#define MOSI 2
80-
#define MISO 3
81-
#define SCK 4
77+
78+
#define SS BOARD_SPI1_NSS_PIN
79+
#define MOSI BOARD_SPI1_MOSI_PIN
80+
#define MISO BOARD_SPI1_MISO_PIN
81+
#define SCK BOARD_SPI1_SCK_PIN
82+
8283

8384
typedef unsigned int word;
8485
// typedef uint16 word;// definition from Arduino website, now appears to be incorrect for 32 bit devices

STM32F1/platform.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# For more info:
44
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
55

6-
name=STM32 Boards (stm32duino)
6+
name=STM32 Boards (STM32duino.com)
77
version=0.1.2
88

99
compiler.warning_flags=-w -DDEBUG_LEVEL=DEBUG_NONE

STM32F4/libraries/arduino_uip/Dns.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ int DNSClient::inet_aton(const char* aIPAddrString, IPAddress& aResult)
5858
{
5959
// See if we've been given a valid IP address
6060
const char* p =aIPAddrString;
61-
while (*p &&
62-
( (*p == '.') || (*p >= '0') || (*p <= '9') ))
61+
while (*p && ( (*p == '.') || ((*p >= '0') && (*p <= '9')) ))
6362
{
6463
p++;
6564
}

STM32F4/libraries/arduino_uip/utility/util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef UTIL_H
22
#define UTIL_H
33

4-
#define htons(x) ( ((x)<<8) | (((x)>>8)&0xFF) )
4+
#define htons(x) ( ((x)<< 8 & 0xFF00) | ((x)>> 8 & 0x00FF) )
55
#define ntohs(x) htons(x)
66

77
#define htonl(x) ( ((x)<<24 & 0xFF000000UL) | \

tools/macosx/dfu-util/dfu-prefix

22.2 KB
Binary file not shown.

tools/macosx/dfu-util/dfu-suffix

22.2 KB
Binary file not shown.

tools/macosx/dfu-util/dfu-util

46.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)