Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GD32L233R-EVAL board support #52654

Merged
merged 8 commits into from
Dec 28, 2022

Conversation

cameled
Copy link
Contributor

@cameled cameled commented Nov 30, 2022

GD32L233R-EVAL board based on Coretex M23 MCU(include System Timer).

@zephyrbot
Copy link
Collaborator

zephyrbot commented Nov 30, 2022

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
hal_gigadevice zephyrproject-rtos/hal_gigadevice@dd0e032 zephyrproject-rtos/hal_gigadevice@024ed9e (main) zephyrproject-rtos/hal_gigadevice@dd0e0322..024ed9e3

Note: This message is automatically posted and updated by the Manifest GitHub Action.

west.yml Show resolved Hide resolved
@zephyrbot zephyrbot added the DNM This PR should not be merged (Do Not Merge) label Dec 4, 2022
@cameled cameled changed the title [DNM] Add GD32L233R-EVAL board support Add GD32L233R-EVAL board support Dec 19, 2022
@cameled cameled force-pushed the gd32l233 branch 2 times, most recently from aec6766 to 2f554d2 Compare December 19, 2022 14:00
gmarull
gmarull previously approved these changes Dec 19, 2022
@cameled
Copy link
Contributor Author

cameled commented Dec 19, 2022

ci failure caused by others.

@cameled cameled requested a review from soburi December 19, 2022 14:34
nandojve
nandojve previously approved these changes Dec 19, 2022
@nandojve nandojve mentioned this pull request Dec 22, 2022
55 tasks
@carlescufi
Copy link
Member

@cameled please rebase

Upgrade hal_gigadevice to add gd32l23x hal.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
@cameled cameled dismissed stale reviews from nandojve and gmarull via d126440 December 25, 2022 10:58
@cameled cameled force-pushed the gd32l233 branch 2 times, most recently from d126440 to 938947a Compare December 25, 2022 11:16
Copy link
Member

@nandojve nandojve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix commit message:

-soc: arm: gigadeivce: add gd32l23x series
+soc: arm: gigadevice: add gd32l23x series

HaiLong Yang added 7 commits December 25, 2022 20:10
The Cortex-M23 on GD32L23x implement the System Timer, but not
contain FPU.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
Add initial support for gd32l23x series. gd32l23x used Cortex-M23, based
on ARMv8-M baseline, implement the System Timer.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
gd32_af pinctrl support gd32l23x series.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
gd32 clock_control support gd32l23x series.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
gd32 adc support gd32l23x series.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
Add initial support for gd32l233r_eval board.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
adc sample support gd32l233r_eval board.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
@cameled
Copy link
Contributor Author

cameled commented Dec 25, 2022

Fix commit message:

-soc: arm: gigadeivce: add gd32l23x series
+soc: arm: gigadevice: add gd32l23x series

Thanks! I add a step to check the commit message spelling.

@carlescufi carlescufi merged commit d850bec into zephyrproject-rtos:main Dec 28, 2022
@cameled cameled deleted the gd32l233 branch January 4, 2023 00:30
@cameled
Copy link
Contributor Author

cameled commented Jan 31, 2023

A boundary test for SRAM0(16K) and SRAM1(16K).

If I write uint16_t low byte to SRAM0 and high byte to SRAM1, it works too.

#include <zephyr/kernel.h>

static K_THREAD_STACK_DEFINE(m_stack, KB(20));
static struct k_thread m_thread_data;

static void thread_handler(void)
{
	uint8_t data[KB(16)];
	uint8_t *addr1 = &data[KB(11) + 0x147];
	uint8_t *addr2 = &data[KB(11) + 0x148];
	uint16_t *addr3 = (uint16_t *)&data[KB(11) + 0x147];

	printk("addr1: %p\n", addr1);
	printk("addr2: %p\n", addr2);
	printk("addr3: %p\n", addr3);

	*addr3 = 0xFF00;
	printk("*addr1: 0x%02x\n", *addr1);
	printk("*addr2: 0x%02x\n", *addr2);
}

void main(void)
{
	k_thread_create(&m_thread_data, m_stack,
			K_THREAD_STACK_SIZEOF(m_stack),
			(k_thread_entry_t)thread_handler,
			NULL, NULL, NULL, K_PRIO_PREEMPT(8), 0, K_NO_WAIT);
}

Output:

addr1: 0x20003fff
addr2: 0x20004000
addr3: 0x20003fff
*addr1: 0x00
*addr2: 0xff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants