You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/11/05 07:54:27 UTC

[GitHub] [incubator-nuttx] xiewenxiang opened a new pull request #4787: riscv/esp32c3: Initialize the BLE Mac

xiewenxiang opened a new pull request #4787:
URL: https://github.com/apache/incubator-nuttx/pull/4787


   ## Summary
   
   ## Impact
   
   ## Testing
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] acassis commented on pull request #4787: riscv/esp32c3: Initialize the BLE Mac

Posted by GitBox <gi...@apache.org>.
acassis commented on pull request #4787:
URL: https://github.com/apache/incubator-nuttx/pull/4787#issuecomment-962085494


   Hi @xiewenxiang it is returning an error:
   ```
   riscv64-unknown-elf-ld: /github/workspace/sources/nuttx/staging/libarch.a(esp32c3_ble_adapter.o): in function `read_mac_wrapper':
   esp32c3_ble_adapter.c:(.iram1+0x98): undefined reference to `esp_read_mac'
   ```
   In IDF it is defined at components/esp_common/src/mac_addr.c


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiewenxiang commented on pull request #4787: riscv/esp32c3: Initialize the BLE Mac

Posted by GitBox <gi...@apache.org>.
xiewenxiang commented on pull request #4787:
URL: https://github.com/apache/incubator-nuttx/pull/4787#issuecomment-962723229


   > Hi @xiewenxiang it is returning an error:
   > 
   > ```
   > riscv64-unknown-elf-ld: /github/workspace/sources/nuttx/staging/libarch.a(esp32c3_ble_adapter.o): in function `read_mac_wrapper':
   > esp32c3_ble_adapter.c:(.iram1+0x98): undefined reference to `esp_read_mac'
   > ```
   > 
   > In IDF it is defined at components/esp_common/src/mac_addr.c
   
   I have modified it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #4787: riscv/esp32c3: Initialize the BLE Mac

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on a change in pull request #4787:
URL: https://github.com/apache/incubator-nuttx/pull/4787#discussion_r745593730



##########
File path: arch/risc-v/src/esp32c3/esp32c3_wireless.c
##########
@@ -29,9 +29,17 @@
 
 #include "hardware/esp32c3_soc.h"
 #include "hardware/esp32c3_syscon.h"
+#include "esp32c3_wireless.h"
 #include "esp32c3.h"
 #include "espidf_wifi.h"
 
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#define MAC_ADDR0_REG (DR_REG_EFUSE_BASE + 0x044)
+#define MAC_ADDR1_REG (DR_REG_EFUSE_BASE + 0x048)

Review comment:
       ```suggestion
   #define MAC_ADDR0_REG EFUSE_RD_MAC_SPI_SYS_0_REG
   #define MAC_ADDR1_REG EFUSE_RD_MAC_SPI_SYS_1_REG
   ```
   It is best to reuse the definitions from https://github.com/apache/incubator-nuttx/blob/master/arch/risc-v/src/esp32c3/hardware/esp32c3_efuse.h#L815
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #4787: riscv/esp32c3: Initialize the BLE Mac

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #4787:
URL: https://github.com/apache/incubator-nuttx/pull/4787#issuecomment-962639807


   @xiewenxiang please fix this warning:
   ```
   /home/runner/work/incubator-nuttx/incubator-nuttx/nuttx/arch/risc-v/src/esp32c3/esp32c3_wireless.c:353:7: error: Right brace must be followed by a blank line
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] gustavonihei merged pull request #4787: riscv/esp32c3: Initialize the BLE Mac

Posted by GitBox <gi...@apache.org>.
gustavonihei merged pull request #4787:
URL: https://github.com/apache/incubator-nuttx/pull/4787


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] acassis commented on pull request #4787: riscv/esp32c3: Initialize the BLE Mac

Posted by GitBox <gi...@apache.org>.
acassis commented on pull request #4787:
URL: https://github.com/apache/incubator-nuttx/pull/4787#issuecomment-962085494


   Hi @xiewenxiang it is returning an error:
   ```
   riscv64-unknown-elf-ld: /github/workspace/sources/nuttx/staging/libarch.a(esp32c3_ble_adapter.o): in function `read_mac_wrapper':
   esp32c3_ble_adapter.c:(.iram1+0x98): undefined reference to `esp_read_mac'
   ```
   In IDF it is defined at components/esp_common/src/mac_addr.c


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #4787: riscv/esp32c3: Initialize the BLE Mac

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on a change in pull request #4787:
URL: https://github.com/apache/incubator-nuttx/pull/4787#discussion_r745593730



##########
File path: arch/risc-v/src/esp32c3/esp32c3_wireless.c
##########
@@ -29,9 +29,17 @@
 
 #include "hardware/esp32c3_soc.h"
 #include "hardware/esp32c3_syscon.h"
+#include "esp32c3_wireless.h"
 #include "esp32c3.h"
 #include "espidf_wifi.h"
 
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#define MAC_ADDR0_REG (DR_REG_EFUSE_BASE + 0x044)
+#define MAC_ADDR1_REG (DR_REG_EFUSE_BASE + 0x048)

Review comment:
       ```suggestion
   #define MAC_ADDR0_REG EFUSE_RD_MAC_SPI_SYS_0_REG
   #define MAC_ADDR1_REG EFUSE_RD_MAC_SPI_SYS_1_REG
   ```
   It is best to reuse the definitions from https://github.com/apache/incubator-nuttx/blob/master/arch/risc-v/src/esp32c3/hardware/esp32c3_efuse.h#L815
   Or even use it directly in the function.
   

##########
File path: arch/risc-v/src/esp32c3/esp32c3_wireless.c
##########
@@ -29,9 +29,17 @@
 
 #include "hardware/esp32c3_soc.h"
 #include "hardware/esp32c3_syscon.h"
+#include "esp32c3_wireless.h"
 #include "esp32c3.h"
 #include "espidf_wifi.h"
 
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#define MAC_ADDR0_REG (DR_REG_EFUSE_BASE + 0x044)
+#define MAC_ADDR1_REG (DR_REG_EFUSE_BASE + 0x048)

Review comment:
       ```suggestion
   #define MAC_ADDR0_REG EFUSE_RD_MAC_SPI_SYS_0_REG
   #define MAC_ADDR1_REG EFUSE_RD_MAC_SPI_SYS_1_REG
   ```
   It is best to reuse the definitions from https://github.com/apache/incubator-nuttx/blob/master/arch/risc-v/src/esp32c3/hardware/esp32c3_efuse.h#L815
   Or even use them directly in the function.
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiewenxiang commented on pull request #4787: riscv/esp32c3: Initialize the BLE Mac

Posted by GitBox <gi...@apache.org>.
xiewenxiang commented on pull request #4787:
URL: https://github.com/apache/incubator-nuttx/pull/4787#issuecomment-993098209


   Hi @xiaoxiang781216 @gustavonihei 
   Could you please merge this PR..
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] acassis commented on pull request #4787: riscv/esp32c3: Initialize the BLE Mac

Posted by GitBox <gi...@apache.org>.
acassis commented on pull request #4787:
URL: https://github.com/apache/incubator-nuttx/pull/4787#issuecomment-962085494


   Hi @xiewenxiang it is returning an error:
   ```
   riscv64-unknown-elf-ld: /github/workspace/sources/nuttx/staging/libarch.a(esp32c3_ble_adapter.o): in function `read_mac_wrapper':
   esp32c3_ble_adapter.c:(.iram1+0x98): undefined reference to `esp_read_mac'
   ```
   In IDF it is defined at components/esp_common/src/mac_addr.c


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiewenxiang commented on pull request #4787: riscv/esp32c3: Initialize the BLE Mac

Posted by GitBox <gi...@apache.org>.
xiewenxiang commented on pull request #4787:
URL: https://github.com/apache/incubator-nuttx/pull/4787#issuecomment-962723481


   > @xiewenxiang please fix this warning:
   > 
   > ```
   > /home/runner/work/incubator-nuttx/incubator-nuttx/nuttx/arch/risc-v/src/esp32c3/esp32c3_wireless.c:353:7: error: Right brace must be followed by a blank line
   > ```
   
   @xiaoxiang781216  OK, I have fixed it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiewenxiang commented on a change in pull request #4787: riscv/esp32c3: Initialize the BLE Mac

Posted by GitBox <gi...@apache.org>.
xiewenxiang commented on a change in pull request #4787:
URL: https://github.com/apache/incubator-nuttx/pull/4787#discussion_r768270876



##########
File path: arch/risc-v/src/esp32c3/esp32c3_wireless.c
##########
@@ -29,9 +29,17 @@
 
 #include "hardware/esp32c3_soc.h"
 #include "hardware/esp32c3_syscon.h"
+#include "esp32c3_wireless.h"
 #include "esp32c3.h"
 #include "espidf_wifi.h"
 
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#define MAC_ADDR0_REG (DR_REG_EFUSE_BASE + 0x044)
+#define MAC_ADDR1_REG (DR_REG_EFUSE_BASE + 0x048)

Review comment:
       done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org