acassis commented on code in PR #17229:
URL: https://github.com/apache/nuttx/pull/17229#discussion_r2460765379


##########
arch/arm/src/am67/chip.h:
##########
@@ -0,0 +1,106 @@
+/****************************************************************************
+ * arch/arm/src/am67/chip.h
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+#ifndef __ARCH_ARM_SRC_AM67_CHIP_H
+#define __ARCH_ARM_SRC_AM67_CHIP_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <stdint.h>
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: CSL_REG32_WR
+ *
+ * Description:
+ *   Write a 32-bit value to a memory-mapped register using the raw write
+ *   function with volatile pointer casting.
+ *
+ ****************************************************************************/
+
+#define CSL_REG32_WR(p, v) (csl_reg32_wr_raw((volatile uint32_t *)(p), \
+                                             (uint32_t)(v)))
+
+/****************************************************************************
+ * Name: CSL_REG32_RD
+ *
+ * Description:
+ *   Read a 32-bit value from a memory-mapped register using the raw read
+ *   function with volatile pointer casting.
+ *
+ ****************************************************************************/
+
+#define CSL_REG32_RD(p)    (csl_reg32_rd_raw((volatile uint32_t *) (p)))
+
+#define CHIP_MPCORE_VBASE       (0x0001800000)
+
+/****************************************************************************
+ * Public Types
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+/****************************************************************************
+ * Inline Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: csl_reg32_wr_raw
+ *
+ * Description:
+ *   Write a 32-bit value directly to a given memory-mapped
+ *   register address.
+ *
+ ****************************************************************************/
+
+static inline void csl_reg32_wr_raw(volatile uint32_t * const p, uint32_t v)

Review Comment:
   @erkan-vatan please fix this error:
   
   Error: armv7-r/arm_mpu.c:545:13: error: format '%X' expects argument of type 
'unsigned int', but argument 4 has type 'long unsigned int' [-Werror=format=]
     545 |       _info("MPU-%d, base=0%08X l2size=%"PRIu32" bufferable=%u"
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   armv7-r/arm_mpu.c:545:31: note: format string is defined here
     545 |       _info("MPU-%d, base=0%08X l2size=%"PRIu32" bufferable=%u"
         |                            ~~~^
         |                               |
         |                               unsigned int
         |                            %08lX
   Error: armv7-r/arm_mpu.c:545:13: error: format '%u' expects argument of type 
'unsigned int', but argument 6 has type 'long unsigned int' [-Werror=format=]
     545 |       _info("MPU-%d, base=0%08X l2size=%"PRIu32" bufferable=%u"
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Error: armv7-r/arm_mpu.c:545:13: error: format '%u' expects argument of type 
'unsigned int', but argument 7 has type 'long unsigned int' [-Werror=format=]
     545 |       _info("MPU-%d, base=0%08X l2size=%"PRIu32" bufferable=%u"
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Error: armv7-r/arm_mpu.c:545:13: error: format '%u' expects argument of type 
'unsigned int', but argument 8 has type 'long unsigned int' [-Werror=format=]
     545 |       _info("MPU-%d, base=0%08X l2size=%"PRIu32" bufferable=%u"
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors
   make[1]: *** [Makefile:170: arm_mpu.o] Error 1
   make[1]: Target 'libarch.a' not remade because of errors.
   make: *** [tools/LibTargets.mk:170: arch/arm/src/libarch.a] Error 2
   make: Target 'all' not remade because of errors.
   /github/workspace/sources/nuttx/tools/testbuild.sh: line 385: 
/github/workspace/sources/nuttx/../nuttx/nuttx.manifest: No such file or 
directory
   
   
   I think you need to use PRIu32 instead of %u



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