casaroli commented on code in PR #19797:
URL: https://github.com/apache/nuttx/pull/19797#discussion_r4093746730


##########
boards/xtensa/esp32s3/esp32s3-devkit/scripts/gnu-elf.ld:
##########
@@ -0,0 +1,159 @@
+/****************************************************************************
+ * boards/xtensa/esp32s3/esp32s3-devkit/scripts/gnu-elf.ld

Review Comment:
   The template's TEXT/DATA do cover the bases, but it keeps `.rodata` in the 
text segment, and this chip selects `ARCH_HAVE_TEXT_HEAP_WORD_ALIGNED_READ`, so 
elf_load.c puts every non-executable section at `datastart`, the link addresses 
have to match that, plus Xtensa needs `.literal` gathered with `.text`.
   
   We can fix it there if you prefer and drop the script here, but then it 
means we will need to have some `#ifdef` in gnu-elf.ld.in.



##########
arch/xtensa/src/esp32s3/esp32s3_addrenv.c:
##########
@@ -0,0 +1,598 @@
+/****************************************************************************
+ * arch/xtensa/src/esp32s3/esp32s3_addrenv.c
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you 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.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <assert.h>
+#include <debug.h>
+#include <errno.h>
+#include <string.h>
+
+#include <nuttx/addrenv.h>
+#include <nuttx/arch.h>
+#include <nuttx/irq.h>
+#include <nuttx/pgalloc.h>
+#include <nuttx/sched.h>
+
+#include "soc/ext_mem_defs.h"
+
+#include "esp32s3_addrenv.h"
+#include "esp32s3_mmu.h"
+#include "esp32s3_spiram.h"
+
+#ifdef CONFIG_ARCH_ADDRENV

Review Comment:
   done



##########
arch/xtensa/src/esp32s3/esp32s3_addrenv_utils.c:
##########
@@ -0,0 +1,171 @@
+/****************************************************************************
+ * arch/xtensa/src/esp32s3/esp32s3_addrenv_utils.c
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you 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.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <assert.h>
+#include <stdbool.h>
+#include <stdint.h>
+
+#include <nuttx/addrenv.h>
+#include <nuttx/arch.h>
+#include <nuttx/pgalloc.h>
+
+#include "esp32s3_addrenv.h"
+
+#ifdef CONFIG_ARCH_ADDRENV

Review Comment:
   done



##########
arch/xtensa/src/esp32s3/esp32s3_pgalloc.c:
##########
@@ -0,0 +1,227 @@
+/****************************************************************************
+ * arch/xtensa/src/esp32s3/esp32s3_pgalloc.c
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you 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.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <assert.h>
+#include <debug.h>
+#include <inttypes.h>
+
+#include <nuttx/addrenv.h>
+#include <nuttx/arch.h>
+#include <nuttx/pgalloc.h>
+#include <nuttx/sched.h>
+
+#include "sched/sched.h"
+
+#include "esp32s3_addrenv.h"
+
+#ifdef CONFIG_ESP32S3_SPIRAM
+#  include "esp32s3_spiram.h"
+#endif
+
+#ifdef CONFIG_MM_PGALLOC

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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to