You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2022/08/03 11:59:18 UTC

[GitHub] [mynewt-core] kasjer opened a new pull request, #2860: riscv: Fix build warning

kasjer opened a new pull request, #2860:
URL: https://github.com/apache/mynewt-core/pull/2860

   This eliminates following warning:
   
   /tmp/ccfBOXIv.s: Assembler messages:
   /tmp/ccfBOXIv.s:6: Warning: setting incorrect section attributes for .data.fe310_flash_transmit
   /tmp/ccfBOXIv.s:41: Warning: setting incorrect section attributes for .data.fe310_flash_fifo_put
   /tmp/ccfBOXIv.s:89: Warning: setting incorrect section attributes for .data.fe310_flash_fifo_write
   /tmp/ccfBOXIv.s:145: Warning: setting incorrect section attributes for .data.fe310_flash_wait_till_ready
   /tmp/ccfBOXIv.s:194: Warning: setting incorrect section attributes for .data.fe310_flash_write_enable
   /tmp/ccfBOXIv.s:232: Warning: setting incorrect section attributes for .data.fe310_flash_write_page
   /tmp/ccfBOXIv.s:419: Warning: setting incorrect section attributes for .data.fe310_flash_erase_sector
   
   .data.XXXX section gets default attributes that are no executable
   renaming .data to .ram_text fixes assembler warning
   This requries change to linker script that now has to include .ram_text.XXXXX in data section
   to work as it used to before change


-- 
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@mynewt.apache.org

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


[GitHub] [mynewt-core] kasjer merged pull request #2860: riscv: Fix build warning

Posted by GitBox <gi...@apache.org>.
kasjer merged PR #2860:
URL: https://github.com/apache/mynewt-core/pull/2860


-- 
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@mynewt.apache.org

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


[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2860: riscv: Fix build warning

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on PR #2860:
URL: https://github.com/apache/mynewt-core/pull/2860#issuecomment-1204221174

   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### hw/mcu/sifive/fe310/src/hal_flash.c
   <details>
   
   ```diff
   @@ -64,15 +64,15 @@
    
    static int
    fe310_flash_read(const struct hal_flash *dev, uint32_t address, void *dst,
   -        uint32_t num_bytes)
   +                 uint32_t num_bytes)
    {
        memcpy(dst, (void *)address, num_bytes);
        return 0;
    }
    
   -static int __attribute((section(".ram_text.fe310_flash_transmit")))
   -fe310_flash_transmit(uint8_t out_byte)
   -{
   +static int
   +__attribute((section(".ram_text.fe310_flash_transmit")))
   +fe310_flash_transmit(uint8_t out_byte) {
        int in_byte;
    
        /* Empty RX FIFO */
   @@ -80,15 +80,15 @@
        }
        SPI0_REG(SPI_REG_TXFIFO) = out_byte;
        do {
   -         in_byte = SPI0_REG(SPI_REG_RXFIFO);
   +        in_byte = SPI0_REG(SPI_REG_RXFIFO);
        } while (in_byte < 0);
    
        return in_byte;
    }
    
   -static int __attribute((section(".ram_text.fe310_flash_fifo_put")))
   -fe310_flash_fifo_put(uint8_t out_byte)
   -{
   +static int
   +__attribute((section(".ram_text.fe310_flash_fifo_put")))
   +fe310_flash_fifo_put(uint8_t out_byte) {
        int went_out = 0;
    
        /* Empty RX FIFO */
   @@ -105,9 +105,9 @@
        return went_out;
    }
    
   -static int __attribute((section(".ram_text.fe310_flash_fifo_write")))
   -fe310_flash_fifo_write(const uint8_t *ptr, int count)
   -{
   +static int
   +__attribute((section(".ram_text.fe310_flash_fifo_write")))
   +fe310_flash_fifo_write(const uint8_t *ptr, int count) {
        int went_out = 0;
    
        while (count > 0) {
   @@ -123,9 +123,9 @@
        return went_out;
    }
    
   -static int __attribute((section(".ram_text.fe310_flash_wait_till_ready")))
   -fe310_flash_wait_till_ready(void)
   -{
   +static int
   +__attribute((section(".ram_text.fe310_flash_wait_till_ready")))
   +fe310_flash_wait_till_ready(void) {
        int status;
        do {
            SPI0_REG(SPI_REG_CSMODE) = SPI_CSMODE_HOLD;
   @@ -138,19 +138,19 @@
        return 0;
    }
    
   -static int __attribute((section(".ram_text.fe310_flash_write_enable")))
   -fe310_flash_write_enable(void)
   -{
   +static int
   +__attribute((section(".ram_text.fe310_flash_write_enable")))
   +fe310_flash_write_enable(void) {
        SPI0_REG(SPI_REG_CSMODE) = SPI_CSMODE_HOLD;
        fe310_flash_transmit(FLASH_CMD_WRITE_ENABLE);
        SPI0_REG(SPI_REG_CSMODE) = SPI_CSMODE_AUTO;
        return 0;
    }
    
   -static int  __attribute((section(".ram_text.fe310_flash_write_page"))) __attribute((noinline))
   +static int
   +__attribute((section(".ram_text.fe310_flash_write_page"))) __attribute((noinline))
    fe310_flash_write_page(const struct hal_flash *dev, uint32_t address,
   -                      const void *src, uint32_t num_bytes)
   -{
   +                      const void *src, uint32_t num_bytes) {
        int sr;
        /* Number of bytes that left controller FIFO */
        int went_out = 0;
   @@ -232,9 +232,9 @@
        return 0;
    }
    
   -static int __attribute((section(".ram_text.fe310_flash_erase_sector"))) __attribute((noinline))
   -fe310_flash_erase_sector(const struct hal_flash *dev, uint32_t sector_address)
   -{
   +static int
   +__attribute((section(".ram_text.fe310_flash_erase_sector"))) __attribute((noinline))
   +fe310_flash_erase_sector(const struct hal_flash *dev, uint32_t sector_address) {
        int sr;
        __HAL_DISABLE_INTERRUPTS(sr);
    
   ```
   
   </details>


-- 
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@mynewt.apache.org

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