修改了license header,修改了sconscipt,修改了board.c指针的强制转换类型,interrupt.c添加了新的函数。
This commit is contained in:
parent
c1f4d6c691
commit
ad917d9010
|
@ -1,22 +1,12 @@
|
|||
/*
|
||||
Copyright 2020 Shenzhen Academy of Aerospace Technology
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Change Logs:
|
||||
Date Author Notes
|
||||
2020-10-16 Dystopia the first version
|
||||
*/
|
||||
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2020-10-16 Dystopia the first version
|
||||
*/
|
||||
|
||||
#include <rthw.h>
|
||||
#include <rtthread.h>
|
||||
|
@ -58,7 +48,7 @@ INIT_BOARD_EXPORT(rt_hw_timer_init);
|
|||
*/
|
||||
void rt_hw_board_init(void)
|
||||
{
|
||||
rt_system_heap_init((void *)&__bss_end, (void *)&__bss_end + 0x01000000);
|
||||
rt_system_heap_init((void *)&__bss_end, (unsigned char *)&__bss_end + 0x01000000);
|
||||
rt_components_board_init();
|
||||
rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
|
||||
}
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
/*
|
||||
Copyright 2020 Shenzhen Academy of Aerospace Technology
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Change Logs:
|
||||
Date Author Notes
|
||||
2020-10-16 Dystopia the first version
|
||||
*/
|
||||
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2020-10-16 Dystopia the first version
|
||||
*/
|
||||
|
||||
#ifndef __BOARD_H__
|
||||
#define __BOARD_H__
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
/*
|
||||
Copyright 2020 Shenzhen Academy of Aerospace Technology
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Change Logs:
|
||||
Date Author Notes
|
||||
2020-10-16 Dystopia the first version
|
||||
*/
|
||||
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2020-10-16 Dystopia the first version
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
/*
|
||||
Copyright 2020 Shenzhen Academy of Aerospace Technology
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Change Logs:
|
||||
Date Author Notes
|
||||
2020-10-16 Dystopia the first version
|
||||
*/
|
||||
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2020-10-16 Dystopia the first version
|
||||
*/
|
||||
|
||||
#include <rthw.h>
|
||||
#include <rtthread.h>
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
/*
|
||||
Copyright 2020 Shenzhen Academy of Aerospace Technology
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Change Logs:
|
||||
Date Author Notes
|
||||
2020-10-16 Dystopia the first version
|
||||
*/
|
||||
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2020-10-16 Dystopia the first version
|
||||
*/
|
||||
|
||||
#ifndef __SERIAL_H__
|
||||
#define __SERIAL_H__
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
/*
|
||||
Copyright 2020 Shenzhen Academy of Aerospace Technology
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Change Logs:
|
||||
Date Author Notes
|
||||
2020-10-16 Dystopia the first version
|
||||
*/
|
||||
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2020-10-16 Dystopia the first version
|
||||
*/
|
||||
|
||||
#ifndef SERIAL_REG_H
|
||||
#define SERIAL_REG_H
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
/*
|
||||
Copyright 2020 Shenzhen Academy of Aerospace Technology
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Change Logs:
|
||||
Date Author Notes
|
||||
2020-10-16 Dystopia the first version
|
||||
*/
|
||||
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2020-10-16 Dystopia the first version
|
||||
*/
|
||||
|
||||
#ifndef __BM3803_H__
|
||||
#define __BM3803_H__
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
/*
|
||||
Copyright 2020 Shenzhen Academy of Aerospace Technology
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Change Logs:
|
||||
Date Author Notes
|
||||
2020-10-16 Dystopia the first version
|
||||
*/
|
||||
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2020-10-16 Dystopia the first version
|
||||
*/
|
||||
|
||||
#define SPARC_PSR_PIL_MASK 0x00000F00
|
||||
#define SPARC_PSR_ET_MASK 0x00000020
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
/*
|
||||
Copyright 2020 Shenzhen Academy of Aerospace Technology
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Change Logs:
|
||||
Date Author Notes
|
||||
2020-10-16 Dystopia the first version
|
||||
*/
|
||||
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2020-10-16 Dystopia the first version
|
||||
*/
|
||||
|
||||
#include <rthw.h>
|
||||
#include <rtthread.h>
|
||||
|
@ -98,3 +88,11 @@ rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler,
|
|||
|
||||
return old_handler;
|
||||
}
|
||||
|
||||
void rt_hw_interrupt_clear(int vector)
|
||||
{
|
||||
if (vector > 0x1F || vector < 0x11)
|
||||
return;
|
||||
volatile struct lregs *regs = (struct lregs *)PREGS;
|
||||
regs->irqclear |= 1 << (vector - 0x10);
|
||||
}
|
||||
|
|
|
@ -1,30 +1,17 @@
|
|||
/*
|
||||
Copyright 2020 Shenzhen Academy of Aerospace Technology
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Change Logs:
|
||||
Date Author Notes
|
||||
2020-10-16 Dystopia the first version
|
||||
*/
|
||||
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2020-10-16 Dystopia the first version
|
||||
* 2020-10-21 Dystopia Add new function
|
||||
*/
|
||||
|
||||
#ifndef __INTERRUPT_H__
|
||||
#define __INTERRUPT_H__
|
||||
|
||||
void rt_hw_interrupt_control(int vector, int priority, int route);
|
||||
int rt_hw_interrupt_get_active(int fiq_irq);
|
||||
void rt_hw_interrupt_ack(int fiq_irq);
|
||||
void rt_hw_interrupt_trigger(int vector);
|
||||
void rt_hw_interrupt_clear(int vector);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
/*
|
||||
Copyright 2020 Shenzhen Academy of Aerospace Technology
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Change Logs:
|
||||
Date Author Notes
|
||||
2020-10-16 Dystopia the first version
|
||||
*/
|
||||
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2020-10-16 Dystopia the first version
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
/*
|
||||
Copyright 2020 Shenzhen Academy of Aerospace Technology
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Change Logs:
|
||||
Date Author Notes
|
||||
2020-10-16 Dystopia the first version
|
||||
*/
|
||||
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2020-10-16 Dystopia the first version
|
||||
*/
|
||||
|
||||
#define PSR_INIT 0x10C0
|
||||
#define PREGS 0x80000000
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
/*
|
||||
Copyright 2020 Shenzhen Academy of Aerospace Technology
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Change Logs:
|
||||
Date Author Notes
|
||||
2020-10-16 Dystopia the first version
|
||||
*/
|
||||
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2020-10-16 Dystopia the first version
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <rthw.h>
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
/*
|
||||
Copyright 2020 Shenzhen Academy of Aerospace Technology
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Change Logs:
|
||||
Date Author Notes
|
||||
2020-10-16 Dystopia the first version
|
||||
*/
|
||||
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2020-10-16 Dystopia the first version
|
||||
*/
|
||||
|
||||
#define TRAPL(H) mov %g0, %l0; sethi %hi(H), %l4; jmp %l4 + %lo(H); nop;
|
||||
#define TRAP(H) mov %psr, %l0; sethi %hi(H), %l4; jmp %l4 + %lo(H); nop;
|
||||
|
|
|
@ -8,16 +8,10 @@ cwd = GetCurrentDir()
|
|||
src = Glob('*.c') + Glob('*.cpp')
|
||||
CPPPATH = [cwd]
|
||||
|
||||
if rtconfig.PLATFORM == 'armcc':
|
||||
src += Glob('*_rvds.S')
|
||||
|
||||
if rtconfig.PLATFORM == 'gcc':
|
||||
src += Glob('*_init.S')
|
||||
src += Glob('*_gcc.S')
|
||||
|
||||
if rtconfig.PLATFORM == 'iar':
|
||||
src += Glob('*_iar.S')
|
||||
|
||||
group = DefineGroup('cpu', src, depend = [''], CPPPATH = CPPPATH)
|
||||
|
||||
Return('group')
|
||||
|
|
Loading…
Reference in New Issue