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

2022-06-24 Thread Duc Doan
sk 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-23 Thread Duc Doan
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); } } > > Please give me more fee

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

2022-06-25 Thread Duc Doan
m32f4_gpio_ctrl_t *ctrl = get_ctrl_from_base(base); uint32_t pin_mask = *(uint32_t *)pin; HAL_GPIO_TogglePin(ctrl->port, pin_mask); return RTEMS_SUCCESSFUL; } /******/ I am still testing and modifying the external interrupt part. Please let me know what

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

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

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, _ctrl); rtems_gpio_get_ctrl(stm32f4, GPIOA, _ctrl); What do you think about this? Best, Duc Doan On Sat, 2022-06-25 at 21:46 +0200, Karel Gardas wrote: > > Hello Duc, &g

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 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 +

[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 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 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 +

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

2022-07-07 Thread Duc Doan
to 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

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

2022-07-07 Thread Duc Doan
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

[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

[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 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

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

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 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 +

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

2022-07-08 Thread Duc Doan
to 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 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

[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 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 +

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

2022-06-27 Thread Duc Doan
0; // 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 operations are still fast. One drawback of this a

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

2022-06-29 Thread Duc Doan
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, maybe we can ju

[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 ---

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
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
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 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

[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 @@

[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] 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

[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
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

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

[Feedback needed] Proposal for ADC API

2022-07-19 Thread Duc Doan
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: [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

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 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

[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 ---

[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

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 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 +

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

2022-07-22 Thread Duc Doan
and 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 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 +

[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

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

2022-07-23 Thread Duc Doan
ading 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

[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

[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

[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

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

2022-07-24 Thread Duc Doan
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: Implementation for GPIO and ADC .gitig

[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 +

[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

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

2022-07-27 Thread Duc Doan
a 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] 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

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, > > >

[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

[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 = [

[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

[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 +-

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 inse

[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 =

[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

[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 +-

[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

[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 v4 1/7] lwip.py: Change arch and bsp check method

2022-09-09 Thread Duc Doan
--- lwip.py | 34 +- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/lwip.py b/lwip.py index 84eef2c..2b0c205 100644 --- a/lwip.py +++ b/lwip.py @@ -99,6 +99,8 @@ def build(bld): drv_incl = [] arch_lib_path =

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

2022-09-09 Thread Duc Doan
- Remove unused lwip.c v4: - Fix improper code addition - Fix aarch64 BSP list in lwip.py - Remove unused lwip.h 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

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

2022-09-09 Thread Duc Doan
--- lwip.py | 21 + 1 file changed, 21 insertions(+) diff --git a/lwip.py b/lwip.py index 2d93d3e..63e1f1d 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 v4 3/7] Add STM32 Ethernet source

2022-09-09 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 +++

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

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

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

2022-09-09 Thread Duc Doan
Updates #4714 --- lwip.py | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lwip.py b/lwip.py index 2b0c205..2d93d3e 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 v4 4/7] rtemslwip: Add STM32F4 lwipopts.h and netstart.c

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

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

2022-09-09 Thread Duc Doan
/stm32f4_lwip.c create mode 100644 rtemslwip/stm32f4/stm32f4_lwip.h diff --git a/rtemslwip/stm32f4/stm32f4_lwip.c b/rtemslwip/stm32f4/stm32f4_lwip.c new file mode 100644 index 000..4aee9fd --- /dev/null +++ b/rtemslwip/stm32f4/stm32f4_lwip.c @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2022 Duc Doan

[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 =

[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

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

2022-09-08 Thread Duc Doan
/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 + * modification, are

[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 +++

[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

[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', +

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

2022-09-08 Thread Duc Doan
: Re: [PATCH rtems-lwip v3 1/7] lwip.py: Change arch and bsp check method On 9/8/2022 11:34, Duc Doan wrote: > --- > lwip.py | 31 ++- > 1 file changed, 18 insertions(+), 13 deletions(-) > > diff --git a/lwip.py b/lwip.py > index 84eef2c..1f0b8e2 1006

[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

[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

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

2022-08-07 Thread Duc Doan
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/shared/start/b

[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

[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 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

Adding third-party source with Apache-2.0 license

2022-08-07 Thread Duc Doan
, 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 v6 00/10] New GPIO, ADC API and STM32F4 BSP implementation

2022-08-07 Thread Duc Doan
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 files

[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

  1   2   >