Skip to content

Commit bdacee7

Browse files
committed
Initial Release
1 parent ae5deb2 commit bdacee7

File tree

168 files changed

+55215
-16
lines changed

Some content is hidden

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

168 files changed

+55215
-16
lines changed

.gitignore

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,40 @@
1-
# Object files
2-
*.o
3-
*.ko
1+
# Private settings
2+
private_settings.py
43

5-
# Libraries
6-
*.lib
7-
*.a
4+
# Compiled Object files
5+
*.slo
6+
*.lo
7+
*.o
88

9-
# Shared objects (inc. Windows DLLs)
10-
*.dll
9+
# Compiled Dynamic libraries
1110
*.so
12-
*.so.*
1311
*.dylib
1412

15-
# Executables
16-
*.exe
17-
*.out
18-
*.app
13+
# Compiled Static libraries
14+
*.lai
15+
*.la
16+
*.a
17+
18+
# Python
19+
*.py[cod]
20+
21+
# Eclipse Project Files
22+
.cproject
23+
.project
24+
.pydevproject
25+
26+
# uVision generated files
27+
*.uvopt
28+
*.plg
29+
*.map
30+
*.lst
31+
*.Inp
32+
*.htm
33+
*.dep
34+
*.d
35+
*.crf
36+
*.bak
37+
38+
*.axf
39+
*.S19
40+
*.bin

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
CMSIS-DAP
2-
=========
3-
41
CMSIS-DAP Interface Firmware
2+
============================
3+
Interface firmware providing USB CMSIS-DAP for debugging, USB MSD for programming, USB Serial for communication.
4+
5+
Documentation
6+
-------------
7+
* [Porting the FW to new boards](http://mbed.org/handbook/cmsis-dap-interface-firmware)
8+
9+
Community
10+
---------
11+
For discussing the development of the CMSIS-DAP Interface Firmware please join our [mbed-devel mailing list](https://groups.google.com/forum/?fromgroups#!forum/mbed-devel).

bootloader/Common/inc/flash.h

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/* CMSIS-DAP Interface Firmware
2+
* Copyright (c) 2009-2013 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
#ifndef FLASH_H
17+
#define FLASH_H
18+
19+
#include <stdint.h>
20+
21+
#define START_APP_ADDRESS (0x5000)
22+
#define SECTOR_SIZE (0x1000)
23+
#define NB_SECTOR (15)
24+
#define END_FLASH (NB_SECTOR*SECTOR_SIZE)
25+
26+
int flash_init (uint32_t clk);
27+
int flash_uninit (uint32_t fnc);
28+
int flash_erase_sector (uint32_t adr);
29+
int flash_program_page (uint32_t adr, uint32_t sz, unsigned char *buf);
30+
31+
int __swi(3) flash_program_page_svc (uint32_t adr, uint32_t sz, uint8_t *buf);
32+
int __swi(2) flash_erase_sector_svc (uint32_t addr);
33+
34+
#endif

bootloader/Common/inc/gpio.h

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/* CMSIS-DAP Interface Firmware
2+
* Copyright (c) 2009-2013 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
#ifndef GPIO_H
17+
#define GPIO_H
18+
19+
#include <stdint.h>
20+
21+
void gpio_init(void);
22+
void gpio_set_msd_led(uint8_t state);
23+
void gpio_set_cdc_led(uint8_t state);
24+
void gpio_set_dap_led(uint8_t state);
25+
uint8_t gpio_get_pin_loader_state(void);
26+
27+
#endif

bootloader/Common/inc/main.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/* CMSIS-DAP Interface Firmware
2+
* Copyright (c) 2009-2013 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
#ifndef MAIN_H
17+
#define MAIN_H
18+
19+
#include <stdint.h>
20+
21+
void main_transfer_finished(uint8_t success);
22+
23+
#endif

bootloader/Common/inc/mbed_htm.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/* CMSIS-DAP Interface Firmware
2+
* Copyright (c) 2009-2013 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
const unsigned char WebSide[] = {
17+
"<!-- mbed Microcontroller Website and Authentication Shortcut -->\r\n"
18+
"<html>\r\n"
19+
"<head>\r\n"
20+
"<meta http-equiv=\"refresh\" content=\"0\"; url=\"http://mbed.org/device/?code_bl=@A\"/>\r\n"
21+
"<title>mbed Website Shortcut</title>\r\n"
22+
"</head>\r\n"
23+
"<body></body>\r\n"
24+
"</html>\r\n"
25+
"\r\n"};

bootloader/Common/inc/read_uid.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/* CMSIS-DAP Interface Firmware
2+
* Copyright (c) 2009-2013 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
#ifndef READ_UID_H
17+
#define READ_UID_H
18+
19+
#include <stdint.h>
20+
21+
void read_unique_id(uint32_t * id);
22+
23+
#endif

bootloader/Common/inc/tasks.h

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/* CMSIS-DAP Interface Firmware
2+
* Copyright (c) 2009-2013 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
/* RTL no timeout value */
17+
#define NO_TIMEOUT (0xffff)
18+
19+
/* Task configuration (Priority, stacks etc.) */
20+
#define LOWEST_PRIORITY (1) /* Priority 0 is reserved for the RTX idle task */
21+
#define HIGHEST_PRIORITY (254) /* Priority 255 is reserved by RTX */
22+
23+
/* main.c */
24+
#define MSC_TASK_PRIORITY (5)
25+
#define FLASH_PROGRAMMING_TASK_PRIORITY (10)
26+
#define LED_TASK_PRIORITY (15)
27+
28+
#define MSC_TASK_STACK (200)

bootloader/Common/inc/vector_table.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* CMSIS-DAP Interface Firmware
2+
* Copyright (c) 2009-2013 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
#ifndef VECTOR_TABLE_H
17+
#define VECTOR_TABLE_H
18+
19+
void relocate_vector_table(void);
20+
21+
#endif

bootloader/Common/inc/version.h

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/* CMSIS-DAP Interface Firmware
2+
* Copyright (c) 2009-2013 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
#ifndef VERSION_H
17+
#define VERSION_H
18+
19+
#include <stdint.h>
20+
21+
#define FW_BUILD "0200"
22+
23+
uint8_t update_html_file(void);
24+
uint8_t get_len_string_interface(void);
25+
uint8_t *get_uid_string_interface(void);
26+
27+
#endif

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy