[PATCH] added print statement to hello world example

2022-04-13 Thread Duc Doan
--- testsuites/samples/hello/init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/testsuites/samples/hello/init.c b/testsuites/samples/hello/init.c index 83f6342ab3..dde33285ab 100644 --- a/testsuites/samples/hello/init.c +++ b/testsuites/samples/hello/init.c @@ -42,6 +42,7 @@ static rtems_t

Problem with STM32 HAL license

2022-06-13 Thread Duc Doan
root directory". The root directory is likely the STM32F4xx_HAL_Driver folder that I have included the direct link above. I would like to ask if I need to modify (adding text clarification in the license text for each file) the files, or should I do something else to be sa

[PATCH] Proposal for new GPIO API and example implementation for STM32F4 BSP

2022-06-14 Thread Duc Doan
structures that need to be implemented by BSP. The functions include initialization, configuration, reading, writing, and toggle. I took inspiration from the Wiring framework. I also have an example implementation for the STM32F4 BSP. I would love to get feedback from all of you. Thank you, Duc Doan

Re: [PATCH] Proposal for new GPIO API and example implementation for STM32F4 BSP

2022-06-21 Thread Duc Doan
* * @param[out] value The state of the pin. * * @retval RTEMS_SUCCESSFUL Pin succesfully read. * @retval RTEMS_UNSATISFIED Could not read pin. */ extern rtems_status_code rtems_gpio_read_pin(rtems_gpio_t *gpiox, rtems_gpio_pin_state *value); Best, Duc Doan ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] Proposal for new GPIO API and example implementation for STM32F4 BSP

2022-06-23 Thread Duc Doan
pin_default(gpiox, value); } } rtems_status_code rtems_gpio_read_pin(rtems_gpio_t *gpiox, rtems_gpio_pin_state *value) { if (gpiox->is_expander) { return rtems_gpio_read_pin_ex(gpiox, value); } else { return rtems_gpio_read_pin_default(gpiox, value);

Re: [PATCH] Proposal for new GPIO API and example implementation for STM32F4 BSP

2022-06-24 Thread Duc Doan
type for pin mask that BSPs will implement, instead of a specific type like uint32_t. That type could be used as a long mask or just a pin number, depending on the BSP. Best, Duc Doan ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] Proposal for new GPIO API and example implementation for STM32F4 BSP

2022-06-25 Thread Duc Doan
ask); return RTEMS_SUCCESSFUL; } rtems_status_code stm32f4_gpio_toggle( rtems_gpio_ctrl_t *base, void *pin ) { stm32f4_gpio_ctrl_t *ctrl = get_ctrl_from_base(base); uint32_t pin_mask = *(uint32_t *)pin; HAL_GPIO_TogglePin(ctrl->port, pin_mask);

Re: [PATCH] Proposal for new GPIO API and example implementation for STM32F4 BSP

2022-06-25 Thread Duc Doan
ctrl); // configure the pin rtems_gpio_set_pin_mode(ctrl, &LED_PIN, RTEMS_GPIO_PINMODE_OUTPUT_PP); rtems_gpio_set_pull(ctrl, &LED_PIN, RTEMS_GPIO_PULLUP); // output to LED rtems_gpio_write(ctrl, &LED_PIN, RTEMS_GPIO_PIN_SET); /*********/

Re: [PATCH] Proposal for new GPIO API and example implementation for STM32F4 BSP

2022-06-26 Thread Duc Doan
, _out) \ _driver##_gpio_get_ctrl( _arg , _out ) In the application code: rtems_gpio_get_ctrl(stm32f4, GPIOD, &led_ctrl); rtems_gpio_get_ctrl(stm32f4, GPIOA, &button_ctrl); What do you think about this? Best, Duc Doan On Sat, 2022-06-25 at 21:46 +0200, Karel Gardas wrote: >

Re: [PATCH] Proposal for new GPIO API and example implementation for STM32F4 BSP

2022-06-26 Thread Duc Doan
ore flexible without complicating the configuration too much. About the strength, I think it should be in the BSP/driver-specific configuration structure because not every controller has it. Best, Duc Doan ___ devel mailing list devel@rtems.org http:/

Re: [PATCH] Proposal for new GPIO API and example implementation for STM32F4 BSP

2022-06-26 Thread Duc Doan
Hello Christian and Karel, On Sun, 2022-06-26 at 10:02 +0200, o...@c-mauderer.de wrote: > Hello Karel and Duc, > > Am 26.06.22 um 09:24 schrieb Duc Doan: > > Hello Karel, > > > > I came up with this solution: making a macro that returns a > > function

Re: [PATCH] Proposal for new GPIO API and example implementation for STM32F4 BSP

2022-06-26 Thread Duc Doan
might be added computation because of translating abstract pin number to physical pin/port. What do you think about this? Best, Duc Doan On Sun, 2022-06-26 at 20:48 +0200, Karel Gardas wrote: > On 6/26/22 10:49, Duc Doan wrote: > > > > #define rtems_gpio_get_ctrl(_dri

Re: [PATCH] Proposal for new GPIO API and example implementation for STM32F4 BSP

2022-06-27 Thread Duc Doan
registers pins to the table uint32_t led_pin = 60; // just a random number rtems_gpio_ctrl_t *led_ctrl = rtems_gpio_get_ctrl(60); rtems_gpio_write(led_ctrl, RTEMS_GPIO_PIN_SET); /* END OF EXAMPLE **/ The only place where the search must be done is now in get_ctrl(), so read/write

Re: [PATCH] Proposal for new GPIO API and example implementation for STM32F4 BSP

2022-06-29 Thread Duc Doan
s quite hard to integrate into current functions because of using virtual pin. I have an assumption that needs confirmation: all microcontrollers (or most of them) have register size equal to word size, and pin masks should be at word size. Is that assumption correct? If so,

[PATCH 0/4] Creating a new GPIO API and adding implementation for STM32F4 BSP

2022-07-05 Thread Duc Doan
Hello, This patch adds a new GPIO API that aims at portability. GPIO of STM32F4 BSP has been implemented using this API. The sample application code can be found at https://github.com/dtbpkmte/GSoC-2022-RTEMS-Sample-Apps. Best, Duc Doan .gitignore

[PATCH 3/4] GPIO API: Add GPIO API

2022-07-05 Thread Duc Doan
. + */ + +/* +* Copyright (c) 2022 Duc Doan +* +* The license and distribution terms for this file may be +* found in the file LICENSE in this distribution or at +* http://www.rtems.org/license/LICENSE. +*/ + +#ifndef LIBBSP_BSP_GPIO2_H +#define LIBBSP_BSP_GPIO2_H + +#include +#include + +/** + * Configure

[PATCH 4/4] STM32F4 GPIO: Add GPIO implementation for STM32F4

2022-07-05 Thread Duc Doan
@@ +/** + * @file + * + * @ingroup rtems_bsp/arm/stm32f4 + * + * @brief RTEMS GPIO new API implementation for STM32F4. + * + * @note RTEMS_GPIO_PINMODE_BSP_SPECIFIC is Alternate mode for STM32F4 BSP + */ + +/* + * Copyright (c) 2022 Duc Doan + * + * The license and distribution terms for this

Re: [PATCH 0/4] Creating a new GPIO API and adding implementation for STM32F4 BSP

2022-07-05 Thread Duc Doan
-RTEMS/commit/d226d07b8985da2f4135340dac9593089d64b49d PATCH 4/4: https://github.com/dtbpkmte/GSoC-2022-RTEMS/commit/f415cc0a2b58f0ae5f2219f2ef96ca7c429d66f6 They were too big that I could not send via email. Best, Duc Doan ___ devel mailing list devel

[PATCH] bsps/arm/stm32f4 Optimize get pin and change from HAL to LL

2022-07-06 Thread Duc Doan
Hello Cedric, Thank you for your feedback. I agree with you that there are places that could be optimized out. Here is a new patch for that. Best, Duc Doan --- bsps/arm/stm32f4/gpio/gpio.c | 87 1 file changed, 29 insertions(+), 58 deletions(-) diff

[PATCH] STM32F4 GPIO: Remove old comments

2022-07-06 Thread Duc Doan
--- bsps/arm/stm32f4/gpio/gpio.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/bsps/arm/stm32f4/gpio/gpio.c b/bsps/arm/stm32f4/gpio/gpio.c index b632236d8d..8e3f7c7131 100644 --- a/bsps/arm/stm32f4/gpio/gpio.c +++ b/bsps/arm/stm32f4/gpio/gpio.c @@ -330,11 +330,6 @@ rtems_statu

[PATCH] Fix missing cppflags

2022-07-06 Thread Duc Doan
Please apply this patch in order to build the BSP. Best, Duc Doan --- spec/build/bsps/arm/grp.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/build/bsps/arm/grp.yml b/spec/build/bsps/arm/grp.yml index b33cc9cdda..d4d259b60c 100644 --- a/spec/build/bsps/arm/grp.yml +++ b/spec

Re: [PATCH] bsps/arm/stm32f4 Optimize get pin and change from HAL to LL

2022-07-07 Thread Duc Doan
d to H7 BSP? Or is there a better way to share the code among all STM32 BSPs? Best, Duc Doan ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] bsps/arm/stm32f4 Optimize get pin and change from HAL to LL

2022-07-07 Thread Duc Doan
Hello Cedric, On Thu, 2022-07-07 at 10:32 +0200, Cedric Berger wrote: > Hello, > > On 07.07.22 09:35, Duc Doan wrote: > > Actually my project is focused on STM32F4, but it is nice that the > > code > > could be extensible to H7. However, I can't think of a good w

[PATCH v2 0/4] *** New GPIO API and implementation for STM32F4 BSP ***

2022-07-07 Thread Duc Doan
static helper arrays to make sure they are placed on ROM Duc Doan (4): bsps/stm32f4 Include STM32F4 HAL bsps/arm: Integrate and build STM32F4 HAL bsps: Add GPIO API bsps/stm32f4: Add GPIO implementation for STM32F4 .gitignore| 1 + bsps/arm/include

[PATCH v2 1/4] bsps/stm32f4 Include STM32F4 HAL

2022-07-07 Thread Duc Doan
This patch is too large so I cannot send via email. Please find it here: https://github.com/dtbpkmte/GSoC-2022-RTEMS/tree/f7ed35b5ce25a5410e72e4950d27ea86afbfe5c4. --- .../stm32f4/hal/Legacy/stm32f4xx_hal_can.c| 1679 .../stm32f4/hal/Legacy/stm32f4xx_hal_eth.c| 2307 + bsps/arm/

[PATCH v2 3/4] bsps: Add GPIO API

2022-07-07 Thread Duc Doan
+ * + * @brief RTEMS GPIO new API definition. + */ + +/* +* Copyright (c) 2022 Duc Doan +* +* The license and distribution terms for this file may be +* found in the file LICENSE in this distribution or at +* http://www.rtems.org/license/LICENSE. +*/ + +#ifndef LIBBSP_BSP_GPIO2_H +#define

[PATCH v2 4/4] bsps/stm32f4: Add GPIO implementation for STM32F4

2022-07-07 Thread Duc Doan
+++ b/bsps/arm/stm32f4/gpio/gpio.c @@ -0,0 +1,555 @@ +/** + * @file + * + * @ingroup rtems_bsp/arm/stm32f4 + * + * @brief RTEMS GPIO new API implementation for STM32F4. + * + * @note RTEMS_GPIO_PINMODE_BSP_SPECIFIC is Alternate mode for STM32F4 BSP + */ + +/* + * Copyright (c) 2022 Duc Doan

[PATCH v2 2/4] bsps/arm: Integrate and build STM32F4 HAL

2022-07-07 Thread Duc Doan
This patch is too large so I cannot send via email. Please find it here: https://github.com/dtbpkmte/GSoC-2022-RTEMS/tree/2baea7f3ffb178d581b3c6b6b7c1b63f8ac55852 --- .gitignore| 1 + bsps/arm/include/cmsis_compiler.h | 266 + bsps/arm/include

Re: [PATCH v2 3/4] bsps: Add GPIO API

2022-07-07 Thread Duc Doan
Hello Karel, On Thu, 2022-07-07 at 14:36 +0200, Karel Gardas wrote: > > Hello Duc, > > just two notes which bothers me most. > > On 7/7/22 13:34, Duc Doan wrote: > > This is the new GPIO API. The header file is > > gpio2.h. > > --- >

[PATCH v3 0/5] *** New GPIO API and implementation for STM32F4 BSP ***

2022-07-08 Thread Duc Doan
static helper arrays to make sure they are placed on ROM v3: - Removed rtems_gpio_begin() - bsp_gpio_register_controllers() now needs to be called from hook1 (can be configured by option STM32F4_ENABLE_GENERIC_GPIO) - Updated license text for API files and STM32F4 GPIO files Duc Doan (5): bsps

[PATCH v3 1/5] bsps/stm32f4 Include STM32F4 HAL

2022-07-08 Thread Duc Doan
This patch is too large so I cannot send via email. Please find it here: https://github.com/dtbpkmte/GSoC-2022-RTEMS/tree/f7ed35b5ce25a5410e72e4950d27ea86afbfe5c4 --- .../stm32f4/hal/Legacy/stm32f4xx_hal_can.c| 1679 .../stm32f4/hal/Legacy/stm32f4xx_hal_eth.c| 2307 + bsps/arm/st

[PATCH v3 2/5] bsps/arm: Integrate and build STM32F4 HAL

2022-07-08 Thread Duc Doan
This patch is too large so I cannot send via email. Please find it here: https://github.com/dtbpkmte/GSoC-2022-RTEMS/tree/2baea7f3ffb178d581b3c6b6b7c1b63f8ac55852 --- .gitignore| 1 + bsps/arm/include/cmsis_compiler.h | 266 + bsps/arm/include

[PATCH v3 3/5] bsps: Add GPIO API

2022-07-08 Thread Duc Doan
+ * + * @brief RTEMS GPIO new API definition. + */ + +/* +* Copyright (c) 2022 Duc Doan +* +* The license and distribution terms for this file may be +* found in the file LICENSE in this distribution or at +* http://www.rtems.org/license/LICENSE. +*/ + +#ifndef LIBBSP_BSP_GPIO2_H +#define

[PATCH v3 4/5] bsps/stm32f4: Add GPIO implementation for STM32F4

2022-07-08 Thread Duc Doan
RTEMS GPIO new API implementation for STM32F4. + * + * @note RTEMS_GPIO_PINMODE_BSP_SPECIFIC is Alternate mode for STM32F4 BSP + */ + +/* + * Copyright (c) 2022 Duc Doan + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at

[PATCH v3 5/5] bsps: Update license text

2022-07-08 Thread Duc Doan
Doan + * Copyright (C) 2022 Duc Doan (dtbpkmte at gmail.com) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright

[PATCH 0/1] Add STM32F4 GPIO functionality

2022-07-10 Thread Duc Doan
This patch adds GPIO functionality of STM32F4 that the GPIO API does not cover. It includes locking pins and setting alternate function. Duc Doan (1): bsps/stm32f4: Add missing GPIO functionality bsps/arm/stm32f4/gpio/gpio.c| 32 + bsps/arm/stm32f4/include

[PATCH 1/1] bsps/stm32f4: Add missing GPIO functionality

2022-07-10 Thread Duc Doan
--- bsps/arm/stm32f4/gpio/gpio.c| 32 + bsps/arm/stm32f4/include/bsp/stm32f4_gpio.h | 20 + 2 files changed, 52 insertions(+) diff --git a/bsps/arm/stm32f4/gpio/gpio.c b/bsps/arm/stm32f4/gpio/gpio.c index efc005bd9f..ac4d3b4f56 100644 --- a/bsps/arm

Re: [PATCH v3 0/5] *** New GPIO API and implementation for STM32F4 BSP ***

2022-07-12 Thread Duc Doan
Hello, This blog of mine describes the API and shows how to use/implement the API for a BSP/driver: https://medium.com/@dtbpkmte/gsoc-2022-rtems-coding-period-week-4-gpio-wiki-1f10e5c4458 Thank you, Duc Doan ___ devel mailing list devel@rtems.org http

[Feedback needed] Proposal for ADC API

2022-07-19 Thread Duc Doan
and I am fixing/writing test applications and adding documentation. I would appreciate all feedback. Thank you very much. Best, Duc Doan ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel

Re: [Feedback needed] Proposal for ADC API

2022-07-21 Thread Duc Doan
ections for me? Do you mean we should find ways to change the way our current APIs work with static constructions instead of adding new APIs? Thank you, Duc Doan ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel

[PATCH v4 0/7] *** New GPIO API and implementation for STM32F4 BSP ***

2022-07-22 Thread Duc Doan
STM32F4 GPIO files v4: - Fixed GPIO port guards - Fixed potential memory-leak bug of STM32F4 GPIO interrupt system - Added comments to STM32F4 GPIO functions and made them extern Duc Doan (7): bsps/stm32f4 Include STM32F4 HAL bsps/arm: Integrate and build STM32F4 HAL bsps: Add GPIO API bsps

[PATCH v4 1/7] bsps/stm32f4 Include STM32F4 HAL

2022-07-22 Thread Duc Doan
This patch is too large so I cannot send via email. Please find it here: https://github.com/dtbpkmte/GSoC-2022-RTEMS/commit/098ca07151bb9186c7681c45f8474cf1441acb40 --- .../stm32f4/hal/Legacy/stm32f4xx_hal_can.c| 1679 .../stm32f4/hal/Legacy/stm32f4xx_hal_eth.c| 2307 + bsps/arm/

[PATCH v4 2/7] bsps/arm: Integrate and build STM32F4 HAL

2022-07-22 Thread Duc Doan
This patch is too large so I cannot send via email. Please find it here: https://github.com/dtbpkmte/GSoC-2022-RTEMS/commit/e21e1fa527da67533f797ed3dc6fc70cf245725b --- .gitignore| 1 + bsps/arm/include/cmsis_compiler.h | 266 + bsps/arm/inclu

[PATCH v4 3/7] bsps: Add GPIO API

2022-07-22 Thread Duc Doan
+ * + * @brief RTEMS GPIO new API definition. + */ + +/* +* Copyright (c) 2022 Duc Doan +* +* The license and distribution terms for this file may be +* found in the file LICENSE in this distribution or at +* http://www.rtems.org/license/LICENSE. +*/ + +#ifndef LIBBSP_BSP_GPIO2_H +#define

[PATCH v4 4/7] bsps/stm32f4: Add GPIO implementation for STM32F4

2022-07-22 Thread Duc Doan
RTEMS GPIO new API implementation for STM32F4. + * + * @note RTEMS_GPIO_PINMODE_BSP_SPECIFIC is Alternate mode for STM32F4 BSP + */ + +/* + * Copyright (c) 2022 Duc Doan + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at

[PATCH v4 5/7] bsps: Update license text

2022-07-22 Thread Duc Doan
Doan + * Copyright (C) 2022 Duc Doan (dtbpkmte at gmail.com) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright

[PATCH v4 6/7] bsps/stm32f4: Add missing GPIO functionality

2022-07-22 Thread Duc Doan
--- bsps/arm/stm32f4/gpio/gpio.c| 32 + bsps/arm/stm32f4/include/bsp/stm32f4_gpio.h | 20 + 2 files changed, 52 insertions(+) diff --git a/bsps/arm/stm32f4/gpio/gpio.c b/bsps/arm/stm32f4/gpio/gpio.c index efc005bd9f..ac4d3b4f56 100644 --- a/bsps/arm

[PATCH v4 7/7] bsps/stm32f4: Fix GPIO port guards and ISR bug

2022-07-22 Thread Duc Doan
Changes GPIO port guards from variant to #ifdef of ports. Fixed ISR memory-leak bug. Changed GPIO functions to extern and added comments for them. --- bsps/arm/stm32f4/gpio/gpio.c| 182 bsps/arm/stm32f4/include/bsp/stm32f4_gpio.h | 167 ++ 2 fil

Re: [PATCH v4 1/7] bsps/stm32f4 Include STM32F4 HAL

2022-07-23 Thread Duc Doan
ite by downloading the zip. And yes, when I tried the command, all HAL files have CRLF. I will remove them in the next patch set. Thanks for the reminder, Duc Doan ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH v4 1/7] bsps/stm32f4 Include STM32F4 HAL

2022-07-23 Thread Duc Doan
Hello Christian, On Sat, 2022-07-23 at 10:31 +0200, o...@c-mauderer.de wrote: > Hello Duc, > > Am 23.07.22 um 09:37 schrieb Duc Doan: > > Hello Karel, > > > > On Sat, 2022-07-23 at 09:09 +0200, Karel Gardas wrote: > > > > > > Duc, > > >

[PATCH v5 0/4] *** New GPIO, ADC API and STM32F4 BSP implementation ***

2022-07-24 Thread Duc Doan
ates on a GPIO pin - Changed GPIO API to comply with the peripherals API - Changed ADC API to comply with the peripherals API - Changed STM32F4 implementation Duc Doan (4): bsps/stm32f4 Include STM32F4 HAL bsps: New GPIO API & peripherals API framework bsps: Add ADC API bsps/stm32f4:

[PATCH v5 1/4] bsps/stm32f4 Include STM32F4 HAL

2022-07-24 Thread Duc Doan
This patch is too large so I cannot send via email. Please find it here: https://github.com/dtbpkmte/GSoC-2022-RTEMS/commit/6f1fbc7dd7a5e0877d8bff11e1b21558928dbc16 --- .gitignore| 1 + bsps/arm/include/cmsis_compiler.h | 266 + bsps/arm/inclu

[PATCH v5 2/4] bsps: New GPIO API & peripherals API framework

2022-07-24 Thread Duc Doan
/include/bsp/gpio2.h new file mode 100644 index 00..9cb1c720ab --- /dev/null +++ b/bsps/include/bsp/gpio2.h @@ -0,0 +1,528 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/* + * Copyright (C) 2022 Duc Doan (dtbpkmte at gmail.com) + * + * Redistribution and use in source and binary forms, with or

[PATCH v5 3/4] bsps: Add ADC API

2022-07-24 Thread Duc Doan
100644 index 00..d168e1b201 --- /dev/null +++ b/bsps/include/bsp/adc.h @@ -0,0 +1,292 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/* + * Copyright (C) 2022 Duc Doan (dtbpkmte at gmail.com) + * + * Redistribution and use in source and binary forms, with or without + * modification, are

[PATCH v5 4/4] bsps/stm32f4: Implementation for GPIO and ADC

2022-07-24 Thread Duc Doan
100644 index 00..21baa9ee2c --- /dev/null +++ b/bsps/arm/stm32f4/adc/adc.c @@ -0,0 +1,655 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/* + * Copyright (C) 2022 Duc Doan (dtbpkmte at gmail.com) + * + * Redistribution and use in source and binary forms, with or without + * modification, are

Re: [PATCH v4 3/7] bsps: Add GPIO API

2022-07-24 Thread Duc Doan
Hello, On Mon, 2022-07-25 at 11:42 +1000, Chris Johns wrote: > On 23/7/2022 1:53 pm, Duc Doan wrote: > > This is the new GPIO API. The header file is > > gpio2.h. > > --- > >  bsps/include/bsp/gpio2.h    | 526 > > >

GSoC 2022 - Midterm Deliverables - Duc Doan

2022-07-25 Thread Duc Doan
code is submitted to devel mailing list. The newest version is v5. Thank you, Duc Doan ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel

[PATCH 0/1] *** bsps/stm32f4: Fix simple console driver bug ***

2022-07-27 Thread Duc Doan
default console_tbl instead of a value from Console_Port_Tbl. This default instance is the USART with smallest number that is enabled (the first element in Console_Configuration_Ports). Duc Doan (1): bsps/stm32f4: Fix usart_write_polled() bsps/arm/stm32f4/console/console-config.c | 4 +++- bsps/arm

[PATCH 1/1] bsps/stm32f4: Fix usart_write_polled()

2022-07-27 Thread Duc Doan
--- bsps/arm/stm32f4/console/console-config.c | 4 +++- bsps/arm/stm32f4/console/usart.c | 6 ++ bsps/arm/stm32f4/include/bsp/usart.h | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/bsps/arm/stm32f4/console/console-config.c b/bsps/arm/stm32f4/console/cons

Re: [PATCH v5 1/4] bsps/stm32f4 Include STM32F4 HAL

2022-07-31 Thread Duc Doan
/git.rtems.org/rtems/commit/bsps/arm/imxrt?id=48f6a6c302a3e1a3f8915e2503d0fe618d1af285 > > Not the best solution but at least someone else can find out roughly > what I did. > Ah yes, I will do that. I thought I only needed to put the description in the email before. > Am 24.07.22 um 14:

Re: [PATCH v5 1/4] bsps/stm32f4 Include STM32F4 HAL

2022-07-31 Thread Duc Doan
Hello Christian, On Sun, 2022-07-31 at 20:01 +0200, o...@c-mauderer.de wrote: > Hello Duc, > > Am 31.07.22 um 17:07 schrieb Duc Doan: > > Hello Christian, > > > > On Sat, 2022-07-30 at 16:32 +0200, o...@c-mauderer.de wrote: > > > Hello Duc, > > > &

Re: [PATCH v5 2/4] bsps: New GPIO API & peripherals API framework

2022-07-31 Thread Duc Doan
Hello Christian, On Sat, 2022-07-30 at 17:50 +0200, o...@c-mauderer.de wrote: > Hello Duc, > > Am 24.07.22 um 14:01 schrieb Duc Doan: > > --- > >   bsps/include/bsp/gpio2.h    | 528 > > > >   bsps/include/bsp/periph_api.h  

Re: [PATCH v5 1/4] bsps/stm32f4 Include STM32F4 HAL

2022-08-01 Thread Duc Doan
Hello Christian, On Mon, 2022-08-01 at 20:32 +0200, o...@c-mauderer.de wrote: > Hello Duc, > > Am 01.08.22 um 04:13 schrieb Duc Doan: > > Hello Christian, > > > > On Sun, 2022-07-31 at 20:01 +0200, o...@c-mauderer.de wrote: > > > Hello Duc, > > >

Re: [PATCH v5 2/4] bsps: New GPIO API & peripherals API framework

2022-08-02 Thread Duc Doan
Hello Christian, On Mon, 2022-08-01 at 20:29 +0200, o...@c-mauderer.de wrote: > Hello Duc, > > Am 01.08.22 um 05:50 schrieb Duc Doan: > > Hello Christian, > > > > On Sat, 2022-07-30 at 17:50 +0200, o...@c-mauderer.de wrote: > > > Hello Duc, > > >

Re: [PATCH v5 1/4] bsps/stm32f4 Include STM32F4 HAL

2022-08-02 Thread Duc Doan
Hello Christian, On Tue, 2022-08-02 at 07:26 +0200, Christian MAUDERER wrote: > That page most likely ignores line endings. Try it with `file` or > `dos2unix -i`: > > > sh> git co master > [...] > sh> file bsps/arm/include/cmsis_gcc.h > bsps/arm/include/cmsis_gcc.h: C source, ASCII text, wi

Re: [PATCH v5 1/4] bsps/stm32f4 Include STM32F4 HAL

2022-08-02 Thread Duc Doan
Hello Christian, On Sat, 2022-07-30 at 22:19 +0200, o...@c-mauderer.de wrote: > > > > Am 30.07.22 um 21:41 schrieb Karel Gardas: > > On 7/30/22 16:32, o...@c-mauderer.de wrote: > > > >   bsps/arm/include/cmsis_compiler.h |   266 + > > > >   bsps/arm/include/cmsis_gcc.h  

[PATCH v6 00/10] New GPIO, ADC API and STM32F4 BSP implementation

2022-08-07 Thread Duc Doan
GPIO API to comply with the peripherals API - Changed ADC API to comply with the peripherals API - Changed STM32F4 implementation v6: - Split commits that add CMSIS and HAL - Removed peripheral API - Changed ADC API: this is now separate from GPIO API Duc Doan (10): bsps/arm: Convert CMSIS

[PATCH v6 03/10] build/bsps/arm: Add new CMSIS files v5 to build

2022-08-07 Thread Duc Doan
--- spec/build/bsps/arm/grp.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/build/bsps/arm/grp.yml b/spec/build/bsps/arm/grp.yml index 37229fddc2..52c2a9f4f3 100644 --- a/spec/build/bsps/arm/grp.yml +++ b/spec/build/bsps/arm/grp.yml @@ -13,6 +13,9 @@ install: - bsps/arm/include/

[PATCH v6 04/10] bsps/arm/stm32f4: Include STM32F4 HAL

2022-08-07 Thread Duc Doan
This patch adds STM32F4 HAL files taken from ST's repository at: https://github.com/STMicroelectronics/STM32CubeF4, Release v1.27.1, commit 52757b5e33259a088509a777a9e3a5b971194c7d. The device headers are copied from Drivers/CMSIS/Device/ST/STM32F4xx/Include. The HAL and LL files are copied from Dr

[PATCH v6 05/10] bsps/arm/stm32f4: Add HAL to build

2022-08-07 Thread Duc Doan
m/stm32f4/hal/stm32f4xx_ll_tim.c +- bsps/arm/stm32f4/hal/stm32f4xx_ll_usart.c +- bsps/arm/stm32f4/hal/stm32f4xx_ll_usb.c +- bsps/arm/stm32f4/hal/stm32f4xx_ll_utils.c +- bsps/arm/stm32f4/hal/system_stm32f4xx.c - bsps/arm/shared/irq/irq-armv7m.c - bsps/arm/shared/irq/irq-dispatch-armv7m.c - bsps/arm/shar

[PATCH v6 06/10] bsps/arm/stm32f4: Make bspstart use HAL

2022-08-07 Thread Duc Doan
0ec5ac27b5..2297430844 100644 --- a/bsps/arm/stm32f4/start/bspstart.c +++ b/bsps/arm/stm32f4/start/bspstart.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2012 Sebastian Huber. All rights reserved. + * Copyright (c) 2022 Duc Doan (dtbpkmte at gmail.com). * * The license and distribution terms for this

[PATCH v6 07/10] bsps: Add GPIO API

2022-08-07 Thread Duc Doan
refer to a physical GPIO controller, + * an ADC, a DAC, or just a group of pins that contains one or more pins. + * + */ + +/* + * Copyright (C) 2022 Duc Doan (dtbpkmte at gmail.com) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provide

[PATCH v6 08/10] bsps/arm/stm32f4: GPIO Implementation

2022-08-07 Thread Duc Doan
/gpio/gpio.c new file mode 100644 index 00..34b1d62cc0 --- /dev/null +++ b/bsps/arm/stm32f4/gpio/gpio.c @@ -0,0 +1,557 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup stm32f4_gpio + */ + +/* + * Copyright (C) 2022 Duc Doan (dtbpkmte at gmail.com

[PATCH v6 09/10] bsps: Add ADC API

2022-08-07 Thread Duc Doan
be required. + * + * The general process to use ADC API: + * - Get an ADC object using @ref rtems_adc_get() + * - Configure ADC object with rtems_adc_set_* functions + * - Call @ref rtems_adc_init() + * - The ADC object should be ready by now + */ + +/* + * Copyright (C) 2022 Duc Doan (dtbpkmte at

[PATCH v6 10/10] bsps/arm/stm32f4: ADC API implementation

2022-08-07 Thread Duc Doan
100644 index 00..61ced0f4c9 --- /dev/null +++ b/bsps/arm/stm32f4/adc/adc.c @@ -0,0 +1,495 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup stm32f4_adc + */ + +/* + * Copyright (C) 2022 Duc Doan (dtbpkmte at gmail.com) + * + * Redistribution and use in

Adding third-party source with Apache-2.0 license

2022-08-07 Thread Duc Doan
RTEMS, or is there anything I need to do to include these sources? Thank you, Duc Doan ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel

[PATCH 0/1] Add confdefs/face.h to install rule

2022-08-10 Thread Duc Doan
Duc Doan (1): build/cpukit: Add confdefs/face.h to install rule spec/build/cpukit/librtemscpu.yml | 1 + 1 file changed, 1 insertion(+) -- 2.37.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel

[PATCH 1/1] build/cpukit: Add confdefs/face.h to install rule

2022-08-10 Thread Duc Doan
Updates #4691 --- spec/build/cpukit/librtemscpu.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/build/cpukit/librtemscpu.yml b/spec/build/cpukit/librtemscpu.yml index 2b12507bff..1270ca131b 100644 --- a/spec/build/cpukit/librtemscpu.yml +++ b/spec/build/cpukit/librtemscpu.yml @@ -191

[rtems-tools PATCH] linkers: Update rtems-score-thread.ini

2022-08-11 Thread Duc Doan
The signature for _Thread_Close() was different in rtems-score-thread.ini and in cpukit/include/rtems/score/threadimpl.h. This changes _Thread_Close() in the .ini file to comply with the new function prototype in threadimpl.h. --- linkers/rtems-score-thread.ini | 2 +- 1 file changed, 1 insertion(

[PATCH rtems-lwip 0/5] lwIP port for STM32F4 BSP

2022-09-03 Thread Duc Doan
. Duc Doan (5): Add STM32 Ethernet source rtemslwip: Add STM32F4 lwipopts.h and netstart.c RTEMS port of lwIP for STM32 and STM32F4 BSP lwip.py: Add STM32 lwIP port to build stm32: Convert to Unix line endings lwip.py | 20 +- rtemslwip/stm32f4/lwipopts.h | 151

[PATCH rtems-lwip 2/5] rtemslwip: Add STM32F4 lwipopts.h and netstart.c

2022-09-03 Thread Duc Doan
--- rtemslwip/stm32f4/lwipopts.h | 141 +++ rtemslwip/stm32f4/netstart.c | 52 + 2 files changed, 193 insertions(+) create mode 100644 rtemslwip/stm32f4/lwipopts.h create mode 100644 rtemslwip/stm32f4/netstart.c diff --git a/rtemslwip/stm32f4/lwipopt

[PATCH rtems-lwip 3/5] RTEMS port of lwIP for STM32 and STM32F4 BSP

2022-09-03 Thread Duc Doan
--- rtemslwip/stm32f4/lwipopts.h | 24 ++- rtemslwip/stm32f4/netstart.c | 29 +++- rtemslwip/stm32f4/stm32f4_lwip.c | 14 ++ rtemslwip/stm32f4/stm32f4_lwip.h | 9 + stm32/ethernetif.c | 288 +-- stm32/ethernetif.h | 14 +- stm32

[PATCH rtems-lwip 1/5] Add STM32 Ethernet source

2022-09-03 Thread Duc Doan
This patch adds ST's Ethernet and lwIP port and DP83848 driver. The files are generated using STM32CubeIDE with STM32F4 Cube FW v1.27.1, under no RTOS mode. --- stm32/driver/dp83848.c | 664 + stm32/driver/dp83848.h | 436 stm32/ethernet

[PATCH rtems-lwip 4/5] lwip.py: Add STM32 lwIP port to build

2022-09-03 Thread Duc Doan
--- lwip.py | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/lwip.py b/lwip.py index 84eef2c..d806b64 100644 --- a/lwip.py +++ b/lwip.py @@ -92,6 +92,17 @@ common_source_files = [ 'rtemslwip/bsd_compat/rtems-kernel-program.c' ] +stm32f4_drv_incl = [

Re: [PATCH rtems-lwip 4/5] lwip.py: Add STM32 lwIP port to build

2022-09-04 Thread Duc Doan
Hello Chris, Thank you for pointing them out. I'll fix them in the next patch set. Best, Duc On Mon, 2022-09-05 at 09:05 +1000, Chris Johns wrote: > On 4/9/2022 11:25 am, Duc Doan wrote: > > --- > >  lwip.py | 20 +++- > >  1 file changed, 19

[PATCH rtems-lwip v2 0/7] lwIP port for STM32F4 BSP

2022-09-06 Thread Duc Doan
: - Changes the arch and BSP check to use rtems.arch and rtems.bsp - Updates #4714: replace os.walk by ant_glob - Group STM32F4 BSP-specific files together Duc Doan (7): lwip.py: Change arch and bsp check method lwip.py: Use ant_glob instead of os.walk() Add STM32 Ethernet source rtemslwip

[PATCH rtems-lwip v2 1/7] lwip.py: Change arch and bsp check method

2022-09-06 Thread Duc Doan
--- lwip.py | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/lwip.py b/lwip.py index 84eef2c..9db5348 100644 --- a/lwip.py +++ b/lwip.py @@ -99,6 +99,8 @@ def build(bld): drv_incl = [] arch_lib_path = rtems.arch_bsp_lib_path(bld.env.RTE

[PATCH rtems-lwip v2 2/7] lwip.py: Use ant_glob instead of os.walk()

2022-09-06 Thread Duc Doan
Updates #4714 --- lwip.py | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lwip.py b/lwip.py index 9db5348..9425dc8 100644 --- a/lwip.py +++ b/lwip.py @@ -110,15 +110,7 @@ def build(bld): source_files.extend(common_source_files) def walk_sources(path): -

[PATCH rtems-lwip v2 3/7] Add STM32 Ethernet source

2022-09-06 Thread Duc Doan
This patch adds ST's Ethernet and lwIP port and DP83848 driver. The files are generated using STM32CubeIDE with STM32F4 Cube FW v1.27.1, under no RTOS mode. --- stm32/driver/dp83848.c | 664 + stm32/driver/dp83848.h | 436 stm32/ethernet

[PATCH rtems-lwip v2 5/7] RTEMS port of lwIP for STM32 and STM32F4 BSP

2022-09-06 Thread Duc Doan
--- rtemslwip/stm32f4/lwipopts.h | 24 ++- rtemslwip/stm32f4/netstart.c | 29 +++- rtemslwip/stm32f4/stm32f4_lwip.c | 14 ++ rtemslwip/stm32f4/stm32f4_lwip.h | 9 + stm32/ethernetif.c | 288 +-- stm32/ethernetif.h | 14 +- stm32

[PATCH rtems-lwip v2 6/7] lwip.py: Add STM32 lwIP port to build

2022-09-06 Thread Duc Doan
--- lwip.py | 22 ++ 1 file changed, 22 insertions(+) diff --git a/lwip.py b/lwip.py index 9425dc8..bb382cd 100644 --- a/lwip.py +++ b/lwip.py @@ -92,6 +92,21 @@ common_source_files = [ 'rtemslwip/bsd_compat/rtems-kernel-program.c' ] +stm32_drv_incl = [ +'stm32', +

[PATCH rtems-lwip v2 4/7] rtemslwip: Add STM32F4 lwipopts.h and netstart.c

2022-09-06 Thread Duc Doan
--- rtemslwip/stm32f4/lwipopts.h | 141 +++ rtemslwip/stm32f4/netstart.c | 52 + 2 files changed, 193 insertions(+) create mode 100644 rtemslwip/stm32f4/lwipopts.h create mode 100644 rtemslwip/stm32f4/netstart.c diff --git a/rtemslwip/stm32f4/lwipopt

[PATCH rtems-lwip v3 0/7] lwIP port for STM32F4 BSP

2022-09-08 Thread Duc Doan
- Remove unused lwip.c Duc Doan (7): lwip.py: Change arch and bsp check method lwip.py: Use ant_glob instead of os.walk() Add STM32 Ethernet source rtemslwip: Add STM32F4 lwipopts.h and netstart.c RTEMS port of lwIP for STM32 and STM32F4 BSP lwip.py: Add STM32 lwIP port to build stm32

[PATCH rtems-lwip v3 1/7] lwip.py: Change arch and bsp check method

2022-09-08 Thread Duc Doan
--- lwip.py | 31 ++- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/lwip.py b/lwip.py index 84eef2c..1f0b8e2 100644 --- a/lwip.py +++ b/lwip.py @@ -99,6 +99,8 @@ def build(bld): drv_incl = [] arch_lib_path = rtems.arch_bsp_lib_path(bld.env.RT

[PATCH rtems-lwip v3 4/7] rtemslwip: Add STM32F4 lwipopts.h and netstart.c

2022-09-08 Thread Duc Doan
tstart.c b/rtemslwip/stm32f4/netstart.c new file mode 100644 index 000..74edac6 --- /dev/null +++ b/rtemslwip/stm32f4/netstart.c @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2022 Duc Doan (dtbpkmte at gmail.com) + * + * Redistribution and use in source and binary forms, with or without + * modifica

[PATCH rtems-lwip v3 3/7] Add STM32 Ethernet source

2022-09-08 Thread Duc Doan
This patch adds ST's Ethernet and lwIP port and DP83848 driver. The files are generated using STM32CubeIDE with STM32F4 Cube FW v1.27.1, under RTOS mode. --- COPYING.stm32 | 28 ++ ORIGIN.stm32 | 2 + stm32/driver/dp83848.c | 664 +++ stm32/driver/

[PATCH rtems-lwip v3 2/7] lwip.py: Use ant_glob instead of os.walk()

2022-09-08 Thread Duc Doan
Updates #4714 --- lwip.py | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lwip.py b/lwip.py index 1f0b8e2..593f0e0 100644 --- a/lwip.py +++ b/lwip.py @@ -110,15 +110,7 @@ def build(bld): source_files.extend(common_source_files) def walk_sources(path): -

[PATCH rtems-lwip v3 5/7] RTEMS port of lwIP for STM32 and STM32F4 BSP

2022-09-08 Thread Duc Doan
--- rtemslwip/stm32f4/stm32f4_lwip.c | 14 rtemslwip/stm32f4/stm32f4_lwip.h | 9 +++ stm32/ethernetif.c | 110 ++- stm32/ethernetif.h | 8 ++- stm32/lwip.h | 2 + 5 files changed, 140 insertions(+), 3 deletions

[PATCH rtems-lwip v3 6/7] lwip.py: Add STM32 lwIP port to build

2022-09-08 Thread Duc Doan
--- lwip.py | 21 + 1 file changed, 21 insertions(+) diff --git a/lwip.py b/lwip.py index 593f0e0..2d8769d 100644 --- a/lwip.py +++ b/lwip.py @@ -92,6 +92,20 @@ common_source_files = [ 'rtemslwip/bsd_compat/rtems-kernel-program.c' ] +stm32_drv_incl = [ +'stm32', +

[PATCH rtems-lwip v3 7/7] stm32: Convert to Unix line endings

2022-09-08 Thread Duc Doan
This patch converts all files imported from ST to Unix line endings --- rtemslwip/stm32f4/lwipopts.h | 294 ++--- stm32/driver/dp83848.c | 1328 +++ stm32/driver/dp83848.h | 872 +++ stm32/ethernetif.c | 1970 +

  1   2   >