Add ChangeLog
authorNIIBE Yutaka <gniibe@fsij.org>
Tue, 18 Jun 2013 04:28:53 +0000 (13:28 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 18 Jun 2013 04:28:53 +0000 (13:28 +0900)
ChangeLog
src/adc.h
src/adc_stm32f103.c
src/neug.ld.in

index 8eebd48..d3c65c2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,46 @@
+2013-06-18  Niibe Yutaka  <gniibe@fsij.org>
+
+       * src/random.c: Update for Chopstx.
+
+       * src/sys.c: Portable version (not for ChibiOS).  Version 2.0.
+       * src/sys.h (clock_init, gpio_init): New.
+
+       * src/stm32f103.h: New.
+
+       * src/neug.ld.in: Declare stack sizes.
+
+       * src/main.c: Update for Chopstx.
+       (usb_intr): Thread for interrupt handling.
+       (Vector90): Remove.
+       (EP1_IN_Callback): Use mutex and cond.
+       (event_flag_init, event_flag_waitone, event_flag_signal): New.
+       (led_blinker): Use event flag of our own.
+       (main): Use mutex and cond.  Use cancel and join.
+
+       * src/configure: Update for Chopstx.
+       (target): Defaults to FST_01.
+
+       * src/adc_stm32f103.c (STM32_ADC_ADC1_IRQ_PRIORITY): Remove.
+       (NEUG_DMA_MODE_CRC32): Add MINC, memory address increment.
+       (adc_init): Handle RCC initialization for ADC.
+       (adc_intr_thread): New.
+       (adc_start): Create a thread for interrupt handling.
+       (adc_start_conversion): Add DMA handling.
+       (adc_stop): Cancel a thread for interrupt handling.
+       (adc_lld_serve_rx_interrupt): Use bigger buffer (256-byte long).
+
+       * src/aes-constant-ft.c: Add comments.  Use stdint.h.
+
+       * src/config.h.in (FLASH_PAGE_SIZE): Remove.
+
+       * src/adc.h: Declare mutex and cond for Chopstx.
+
+       * chopstx: New, Chopstx RT Thread Library.
+       * chibios: Remove.
+       * src/Makefile.in: Update for Chopstx.
+
+       * src/usb_stm32f103.c (TRUE, FALSE, NULL): Defined here.
+
 2013-03-15  Niibe Yutaka  <gniibe@fsij.org>
 
        * Version 0.06.
index 95f9c02..2ed9bf6 100644 (file)
--- a/src/adc.h
+++ b/src/adc.h
@@ -10,4 +10,3 @@ void adc_stop (void);
 #define ADC_SAMPLE_MODE 0
 #define ADC_CRC32_MODE       1
 void adc_start_conversion (int mode, uint32_t *p, int size);
-
index 92b0834..88480de 100644 (file)
      | STM32_DMA_CR_MINC       | STM32_DMA_CR_TCIE                     \
      | STM32_DMA_CR_TEIE)
 
-#if 0
-#define NEUG_DMA_MODE_CRC32                                             \
-  (  STM32_DMA_CR_PL (STM32_ADC_ADC1_DMA_PRIORITY)                     \
-     | STM32_DMA_CR_MSIZE_WORD | STM32_DMA_CR_PSIZE_WORD               \
-     | STM32_DMA_CR_TCIE       | STM32_DMA_CR_TEIE)
-#else
 #define NEUG_DMA_MODE_CRC32                                             \
   (  STM32_DMA_CR_PL (STM32_ADC_ADC1_DMA_PRIORITY)                     \
      | STM32_DMA_CR_MSIZE_WORD | STM32_DMA_CR_PSIZE_WORD               \
      | STM32_DMA_CR_MINC                                                       \
      | STM32_DMA_CR_TCIE       | STM32_DMA_CR_TEIE)
-#endif
 
 #define NEUG_ADC_SETTING1_SMPR1 ADC_SMPR1_SMP_VREF(ADC_SAMPLE_VREF)     \
                               | ADC_SMPR1_SMP_SENSOR(ADC_SAMPLE_SENSOR)
@@ -283,7 +276,6 @@ void adc_stop (void)
   ADC2->CR1 = 0;
   ADC2->CR2 = 0;
 
-  /* XXX: here to disable the associated IRQ vector; stop intr thread.  */
   RCC->AHBENR &= ~RCC_AHBENR_DMA1EN;
   RCC->APB2ENR &= ~(RCC_APB2ENR_ADC1EN | RCC_APB2ENR_ADC2EN);
 
index 044ed98..80816c8 100644 (file)
@@ -1,12 +1,12 @@
 /*
  * ST32F103 memory setup.
  */
-__main_stack_size__     = 0x0100;      /* Exception handlers     */
-__process0_stack_size__  = 0x0400;     /* main */
-__process1_stack_size__  = 0x0100;     /* led */
-__process2_stack_size__  = 0x0200;     /* rng */
-__process3_stack_size__  = 0x0100;     /* intr: usb */
-__process4_stack_size__  = 0x0100;     /* intr: adc dma */
+__main_stack_size__     = 0x0100;       /* Exception handlers     */
+__process0_stack_size__  = 0x0400;      /* main */
+__process1_stack_size__  = 0x0100;      /* led */
+__process2_stack_size__  = 0x0200;      /* rng */
+__process3_stack_size__  = 0x0100;      /* intr: usb */
+__process4_stack_size__  = 0x0100;      /* intr: adc dma */
 
 MEMORY
 {
@@ -17,7 +17,7 @@ MEMORY
 
 /* __flash_start__: flash ROM start address regardless of DFU_SUPPORT */
 __flash_start__         = 0x08001000;
-__flash_end__          = ORIGIN(flash) + LENGTH(flash);
+__flash_end__           = ORIGIN(flash) + LENGTH(flash);
 
 __ram_start__           = ORIGIN(ram);
 __ram_size__            = LENGTH(ram);
@@ -31,16 +31,16 @@ SECTIONS
     {
         _sys = .;
         KEEP(*(.vectors))
-       . = ALIGN(16);
-       *(.sys.version)
-       build/sys.o(.text)
-       build/sys.o(.text.*)
+        . = ALIGN(16);
+        *(.sys.version)
+        build/sys.o(.text)
+        build/sys.o(.text.*)
         build/sys.o(.rodata)
-       build/sys.o(.rodata.*)
-       . = ALIGN(1024);
-       *(.sys.0)
-       *(.sys.1)
-       *(.sys.2)
+        build/sys.o(.rodata.*)
+        . = ALIGN(1024);
+        *(.sys.0)
+        *(.sys.1)
+        *(.sys.2)
     } > flash0
 
     _text = .;