Skip to content

Commit ad917d9

Browse files
committed
修改了license header,修改了sconscipt,修改了board.c指针的强制转换类型,interrupt.c添加了新的函数。
1 parent c1f4d6c commit ad917d9

File tree

15 files changed

+122
-263
lines changed

15 files changed

+122
-263
lines changed

bsp/bm3803/applications/board.c

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
11
/*
2-
Copyright 2020 Shenzhen Academy of Aerospace Technology
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-
Change Logs:
17-
Date Author Notes
18-
2020-10-16 Dystopia the first version
19-
*/
2+
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2020-10-16 Dystopia the first version
9+
*/
2010

2111
#include <rthw.h>
2212
#include <rtthread.h>
@@ -58,7 +48,7 @@ INIT_BOARD_EXPORT(rt_hw_timer_init);
5848
*/
5949
void rt_hw_board_init(void)
6050
{
61-
rt_system_heap_init((void *)&__bss_end, (void *)&__bss_end + 0x01000000);
51+
rt_system_heap_init((void *)&__bss_end, (unsigned char *)&__bss_end + 0x01000000);
6252
rt_components_board_init();
6353
rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
6454
}

bsp/bm3803/applications/board.h

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
11
/*
2-
Copyright 2020 Shenzhen Academy of Aerospace Technology
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-
Change Logs:
17-
Date Author Notes
18-
2020-10-16 Dystopia the first version
19-
*/
2+
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2020-10-16 Dystopia the first version
9+
*/
2010

2111
#ifndef __BOARD_H__
2212
#define __BOARD_H__

bsp/bm3803/applications/main.c

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
11
/*
2-
Copyright 2020 Shenzhen Academy of Aerospace Technology
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-
Change Logs:
17-
Date Author Notes
18-
2020-10-16 Dystopia the first version
19-
*/
2+
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2020-10-16 Dystopia the first version
9+
*/
2010

2111
#include <stdint.h>
2212
#include <stdio.h>

bsp/bm3803/drivers/uart.c

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
11
/*
2-
Copyright 2020 Shenzhen Academy of Aerospace Technology
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-
Change Logs:
17-
Date Author Notes
18-
2020-10-16 Dystopia the first version
19-
*/
2+
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2020-10-16 Dystopia the first version
9+
*/
2010

2111
#include <rthw.h>
2212
#include <rtthread.h>

bsp/bm3803/drivers/uart.h

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
11
/*
2-
Copyright 2020 Shenzhen Academy of Aerospace Technology
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-
Change Logs:
17-
Date Author Notes
18-
2020-10-16 Dystopia the first version
19-
*/
2+
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2020-10-16 Dystopia the first version
9+
*/
2010

2111
#ifndef __SERIAL_H__
2212
#define __SERIAL_H__

bsp/bm3803/drivers/uart_reg.h

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
11
/*
2-
Copyright 2020 Shenzhen Academy of Aerospace Technology
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-
Change Logs:
17-
Date Author Notes
18-
2020-10-16 Dystopia the first version
19-
*/
2+
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2020-10-16 Dystopia the first version
9+
*/
2010

2111
#ifndef SERIAL_REG_H
2212
#define SERIAL_REG_H

libcpu/sparc-v8/bm3803/bm3803.h

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
11
/*
2-
Copyright 2020 Shenzhen Academy of Aerospace Technology
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-
Change Logs:
17-
Date Author Notes
18-
2020-10-16 Dystopia the first version
19-
*/
2+
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2020-10-16 Dystopia the first version
9+
*/
2010

2111
#ifndef __BM3803_H__
2212
#define __BM3803_H__

libcpu/sparc-v8/bm3803/context_gcc.S

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
11
/*
2-
Copyright 2020 Shenzhen Academy of Aerospace Technology
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-
Change Logs:
17-
Date Author Notes
18-
2020-10-16 Dystopia the first version
19-
*/
2+
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2020-10-16 Dystopia the first version
9+
*/
2010

2111
#define SPARC_PSR_PIL_MASK 0x00000F00
2212
#define SPARC_PSR_ET_MASK 0x00000020

libcpu/sparc-v8/bm3803/interrupt.c

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
11
/*
2-
Copyright 2020 Shenzhen Academy of Aerospace Technology
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-
Change Logs:
17-
Date Author Notes
18-
2020-10-16 Dystopia the first version
19-
*/
2+
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2020-10-16 Dystopia the first version
9+
*/
2010

2111
#include <rthw.h>
2212
#include <rtthread.h>
@@ -98,3 +88,11 @@ rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler,
9888

9989
return old_handler;
10090
}
91+
92+
void rt_hw_interrupt_clear(int vector)
93+
{
94+
if (vector > 0x1F || vector < 0x11)
95+
return;
96+
volatile struct lregs *regs = (struct lregs *)PREGS;
97+
regs->irqclear |= 1 << (vector - 0x10);
98+
}

libcpu/sparc-v8/bm3803/interrupt.h

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,17 @@
11
/*
2-
Copyright 2020 Shenzhen Academy of Aerospace Technology
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-
Change Logs:
17-
Date Author Notes
18-
2020-10-16 Dystopia the first version
19-
*/
2+
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2020-10-16 Dystopia the first version
9+
* 2020-10-21 Dystopia Add new function
10+
*/
2011

2112
#ifndef __INTERRUPT_H__
2213
#define __INTERRUPT_H__
2314

24-
void rt_hw_interrupt_control(int vector, int priority, int route);
25-
int rt_hw_interrupt_get_active(int fiq_irq);
26-
void rt_hw_interrupt_ack(int fiq_irq);
27-
void rt_hw_interrupt_trigger(int vector);
2815
void rt_hw_interrupt_clear(int vector);
2916

3017
#endif

0 commit comments

Comments
 (0)