Quantcast
Channel: ARM Connected Community: Message List
Viewing all 8551 articles
Browse latest View live

Re: Re: ARMCC Porting Issue for arm none-eabi gcc

$
0
0

One solution might be to compile with "armcc --gnu".

 

hth

Simon.


Re: Sunrise Micro - the ARM of radios?

$
0
0

Thanks for the shout-out Rhonda Dirvin.

Semiconductor companies making ICs for IoT node devices will no longer just be able to offer a micro-controller or sensor solution – all these companies now need radios (a connectivity solution) as well. Albeit mine is a very biased view , I think the timing is right for radio IP licensing.

Sunrise Micro Devices

Re: Memcpy

$
0
0

Chrish,

      Below is the code added by me and the one which is giving problem. Rest of the  code is the example code ( strings and strings_copy ara already in the example)

 

int nParts = 28;

    int location = 4;

    MY_STR *pBase;

    MY_STR *pCurrLoc;

    MY_STR *pLeftLoc;

 

    pBase = (MY_STR *) malloc(nParts * sizeof (MY_STR));

    if (pBase == NULL)

    {

        printf("\n Failed to allocate memory for pBase of type MY_STR in file sorts.c \n");

        return -1;

    }

 

    pCurrLoc = &pBase[ location ];

    pLeftLoc = &pBase[ location - 1 ];

 

    memcpy(pCurrLoc, pLeftLoc, sizeof (MY_STR));--------------------> Added by me

 

Pls try to  help me out  reg this???

Re: Memcpy

$
0
0

Ofcourse it is. Im using the unaligned data only.

stall

Re: Memcpy

$
0
0

Thanks for posting the code. Are you able to say what error occurs when you try to run it?

Re: Design Start ARM Cortex-M0

$
0
0

Hi,

1)  We need to process two signal which we are taking through ADC, do digital filtering and feature extraction(peak detection ). Take the result using UART to host PC.

  

2)  We have already used  cortex M3 processor  in a kit LPC1768 and wrote  codes for filtering and feature extraction  using mbed complier.

https://mbed.org/compiler/

which is working correct.

  we have to do the same using cortex M0 core on a FPGA(ATLYS) board,  will same code would work or we have to change it for cortex M0(don't know about compatibility)

 

3) LPC1768  had a ADC in it so we were taking signal through it and processing it. For FPGA implementation  I thought of using this as a pmod peripheral

http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,401,933&Prod=PMOD-AD2

which work on I2C for transferring data. Now  this data coming through ADC should be given to AHBLite which is connected to the processor. 

Could you please suggest the feasibility and steps for doing the same ?

 

4) We are planning to use the on chip memory for our implementation. In general we create a .hex file for code and initializing the memory with this , now  if we want to apply the same code to samples of data stored in the memory , how can we initialize the data memory with samples of data and access the same ?

 

Reagrds..

Re: Memcpy

$
0
0

Chris,

 

   When my code is encountering the line containing memcpy, its going to infinite loop( THE ERROR : NO STACK) and getting crashed.

 

Thx

Pavitra


I need you help

$
0
0

Hello friends, I need your help

have time programming code for 8051 (c51) in keil and have no problem

but now I would like to start with arm, specifically with LPC2138 and I want to convert the code I show is written for 8051

but I can not do start All I know is how to define ports and little else.

I swear I've tried but have not succeeded.

the code is for a led matrix display and Works fine

please can help me?

the arm is no attempt to use the uart

thank you very much

 

the code in 8051 is:

  1.   //crystal is 22-24MHz
  2. //was made for Keil compiler
  3. #include
  4. #define BAUDRATE 9600 
  5. sbit Cclock=P1^1;
  6. sbit Clatch=P1^0;
  7. sbit Cdata=P3^7;
  8. sbit Row1=P1^2;
  9. sbit Row2=P1^3;
  10. sbit Row3=P1^4;
  11. sbit Row4=P1^5;
  12. sbit Row5=P1^6;
  13. sbit Row6=P1^7;
  14. sbit Row7=P3^2;
  15. sbit Row8=P3^3;
  16. unsignedint shift_delay;
  17. unsignedchar code font[96][16]=
  18. {
  19.    /* character 0x0020 (' '): (width=7, offset=0) */
  20. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  21. 0x00,0x00,0x00,0x00,0x00,0x00},
  22. /* character 0x0021 ('!'): (width=8, offset=14) */
  23. {0XFF,0XE,0X78,0X78,0XE0,0XFF},
  24. /* character 0x0022 ('"'): (width=8, offset=30) */
  25. {0x00,0xE0,0xE0,0x00,0x00,0xE0,0xE0,0x00,
  26. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  27. /* character 0x0023 ('#'): (width=8, offset=46) */
  28. {0x00,0x22,0xFF,0xFF,0x22,0xFF,0xFF,0x22,
  29. 0x00,0x00,0x80,0x80,0x00,0x80,0x80,0x00},
  30. /* character 0x0024 ('$'): (width=8, offset=62) */
  31. 0x00,0x61,0xF1,0x98,0x8C,0xC7,0x43,0x00,
  32. 0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,
  33. /* character 0x0025 ('%'): (width=8, offset=78) */
  34. {0xC0,0xE3,0x26,0xED,0xDB,0x32,0x63,0x01,
  35. 0x00,0x00,0x00,0x80,0x80,0x00,0x80,0x80},
  36. /* character 0x0026 ('&'): (width=8, offset=94) */
  37. {0x00,0x6F,0xFF,0x90,0xF4,0x67,0x07,0x04,
  38. 0x00,0x00,0x80,0x80,0x80,0x00,0x80,0x80},
  39. /* character 0x0027 ('''): (width=8, offset=110) */
  40. {0x00,0x00,0x00,0xE0,0xE0,0x00,0x00,0x00,
  41. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  42. {0x00,0x00,0x03,0x0F,0x1C,0x10,0x00,0x00,
  43. 0x00,0x00,0xE0,0xF8,0x1C,0x04,0x00,0x00},
  44.   
  45. /* character 0x0029 (')'): (width=8, offset=0) */
  46. {0x00,0x00,0x10,0x1C,0x0F,0x03,0x00,0x00,
  47. 0x00,0x00,0x04,0x1C,0xF8,0xE0,0x00,0x00},
  48. /* character 0x002A ('*'): (width=8, offset=16) */
  49. {0x00,0x01,0x05,0x07,0x03,0x07,0x05,0x01,
  50. 0x00,0x00,0x40,0xC0,0x80,0xC0,0x40,0x00},
  51. /* character 0x002B ('+'): (width=8, offset=32) */
  52. {0x00,0x01,0x01,0x07,0x07,0x01,0x01,0x00,
  53. 0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00},
  54. /* character 0x002C (','): (width=8, offset=48) */
  55. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  56. 0x00,0x00,0x00,0x34,0x3C,0x38,0x00,0x00},
  57. /* character 0x002D ('-'): (width=8, offset=64) */
  58. {0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x00,
  59. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  60. /* character 0x002E ('.'): (width=8, offset=80) */
  61. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  62. 0x00,0x00,0x00,0x30,0x30,0x30,0x00,0x00},
  63. /* character 0x002F ('/'): (width=8, offset=96) */
  64. {0x00,0x00,0x00,0x01,0x07,0x1E,0x18,0x00,
  65. 0x00,0x18,0x78,0xE0,0x80,0x00,0x00,0x00},
  66. /* character 0x0030 ('0'): (width=8, offset=112) */
  67. {0x00,0x00,0x0F,0x1F,0x10,0x16,0x1F,0x0F,
  68. 0x00,0x00,0xE0,0xF0,0xD0,0x10,0xF0,0xE0},
  69. /* character 0x0031 ('1'): (width=8, offset=128) */
  70. {0x00,0x04,0x04,0x0C,0x1F,0x1F,0x00,0x00,
  71. 0x00,0x00,0x00,0x00,0xF0,0xF0,0x00,0x00},
  72. /* character 0x0032 ('2'): (width=8, offset=144) */
  73. {0x00,0x0C,0x1C,0x10,0x11,0x1F,0x0E,0x00,
  74. 0x00,0x30,0x70,0xD0,0x90,0x10,0x10,0x00},
  75. /* character 0x0033 ('3'): (width=8, offset=160) */
  76. {0x00,0x0C,0x1C,0x11,0x11,0x1F,0x0E,0x00,
  77. 0x00,0x60,0x70,0x10,0x10,0xF0,0xE0,0x00},
  78. /* character 0x0034 ('4'): (width=8, offset=176) */
  79. {0x00,0x00,0x1F,0x1F,0x00,0x07,0x07,0x00,
  80. 0x00,0xC0,0xC0,0x40,0x40,0xF0,0xF0,0x40},
  81. /* character 0x0035 ('5'): (width=8, offset=192) */
  82. {0x00,0x1F,0x1F,0x11,0x11,0x11,0x10,0x00,
  83. 0x00,0x10,0x10,0x10,0x30,0xE0,0xC0,0x00},
  84. /* character 0x0036 ('6'): (width=8, offset=208) */
  85. {0x00,0x03,0x07,0x1E,0x1A,0x13,0x01,0x00,
  86. 0x00,0xE0,0xF0,0x10,0x10,0xF0,0xE0,0x00},
  87. /* character 0x0037 ('7'): (width=8, offset=224) */
  88. {0x00,0x10,0x10,0x11,0x17,0x1E,0x18,0x00,
  89. 0x00,0x00,0x70,0xF0,0x80,0x00,0x00,0x00},
  90.   /* character 0x0038 ('8'): (width=8, offset=0) */
  91. {0x00,0x0E,0x1F,0x13,0x11,0x1F,0x0E,0x00,
  92. 0x00,0xE0,0xF0,0x10,0x90,0xF0,0xE0,0x00},
  93. /* character 0x0039 ('9'): (width=8, offset=16) */
  94. {0x00,0x0F,0x1F,0x10,0x10,0x1F,0x0F,0x00,
  95. 0x00,0x00,0x90,0xB0,0xF0,0xC0,0x80,0x00},
  96. /* character 0x003A (':'): (width=8, offset=32) */
  97. {0x00,0x00,0x00,0x06,0x06,0x06,0x00,0x00,
  98. 0x00,0x00,0x00,0x30,0x30,0x30,0x00,0x00},
  99. /* character 0x003B (';'): (width=8, offset=48) */
  100. {0x00,0x00,0x00,0x06,0x06,0x06,0x00,0x00,
  101. 0x00,0x00,0x00,0x34,0x3C,0x38,0x00,0x00},
  102. /* character 0x003C ('<'): (width=8, offset=64) */
  103. {0x00,0x01,0x03,0x06,0x0C,0x18,0x10,0x00,
  104. 0x00,0x00,0x80,0xC0,0x60,0x30,0x10,0x00},
  105. /* character 0x003D ('='): (width=8, offset=80) */
  106. {0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x00,
  107. 0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00},
  108. /* character 0x003E ('>'): (width=8, offset=96) */
  109. {0x00,0x10,0x18,0x0C,0x06,0x03,0x01,0x00,
  110. 0x00,0x10,0x30,0x60,0xC0,0x80,0x00,0x00},
  111. /* character 0x003F ('?'): (width=8, offset=112) */
  112. {0x00,0x0C,0x1C,0x11,0x13,0x1E,0x0C,0x00,
  113. 0x00,0x00,0x00,0xB0,0xB0,0x00,0x00,0x00},
  114. /* character 0x0040 ('@'): (width=8, offset=128) */
  115. {0x0F,0x1F,0x10,0x11,0x13,0x12,0x1F,0x0F,
  116. 0xE0,0xF0,0x10,0x90,0xD0,0x50,0xD0,0xD0},
  117. /* character 0x0041 ('A'): (width=8, offset=144) */
  118. {0x7F,0xFF,0x88,0x88,0xFF,0x7F
  119. }, 
  120. /* character 0x0042 ('B'): (width=8, offset=160) */
  121. {0xFF,0xFF,0x81,0x99,0xDB,0x7E},
  122. /* character 0x0043 ('C'): (width=8, offset=176) */
  123. {0xFF,0xFF,0x81,0x81,0xC3,0xC3},
  124. /* character 0x0044 ('D'): (width=8, offset=192) */
  125. {0xFF,0xFF,0xC3,0xC3,0x7E,0x3C},
  126. /* character 0x0045 ('E'): (width=8, offset=208) */
  127. {0xFF,0xFF,0xDB,0xDB,0xDB,0xC3},
  128. /* character 0x0046 ('F'): (width=8, offset=224) */
  129. {0xFF,0xFF,0x88,0x88,0x88,0x80},
  130. /* character 0x0047 ('G'): (width=8, offset=240) */
  131. {0x7E,0xFF,0x81,0x89,0xEF,0x6F},
  132. /* character 0x0048 ('H'): (width=8, offset=256) */
  133. {0xFF,0xFF,0x08,0x08,0xFF,0xFF},
  134. /* character 0x0049 ('I'): (width=8, offset=272) */
  135. {0xC3,0xC3,0xFF,0xFF,0xC3,0xC3},
  136. /* character 0x004A ('J'): (width=8, offset=288) */
  137. {0x06,0x07,0x01,0x01,0xFF,0xFE},
  138. /* character 0x004B ('K'): (width=8, offset=304) */
  139. {0xFF,0xFF,0x18,0x3C,0x66,0xC3},
  140. /* character 0x004C ('L'): (width=8, offset=320) */
  141. {0xFF,0xFF,0x03,0x03,0x03,0x03}, 
  142. /* character 0x004D ('M'): (width=8, offset=336) */
  143. {0XFF,0XE0,0X78,0X78,0XE0,0XFF},
  144. /* character 0x004E ('N'): (width=8, offset=352) */
  145. {0xFF,0xFF,0x38,0x1C,0xFF,0xFF},
  146.    /* character 0x004F ('O'): (width=8, offset=0) */
  147. {0x7E,0xFF,0x81,0x81,0xFF,0x7E},
  148. /* character 0x0050 ('P'): (width=8, offset=16) */
  149. {0xFF,0xFF,0xD8,0xD8,0xF8,0xF8},
  150. /* character 0x0051 ('Q'): (width=8, offset=32) */
  151. {0x7E,0xC3,0x81,0x85,0xC2,0x7D},
  152. /* character 0x0052 ('R'): (width=8, offset=48) */
  153. {0xFF,0xFF,0x88,0x8C,0xFF,0x73},
  154. /* character 0x0053 ('S'): (width=8, offset=64) */
  155. {0x72,0xF3,0xDB,0xDB,0xCF,0x46},
  156. /* character 0x0054 ('T'): (width=8, offset=80) */
  157. {0xC0,0xC0,0xFF,0xFF,0xC0,0xC0},
  158. /* character 0x0055 ('U'): (width=8, offset=96) */
  159. {0xFE,0xFF,0x01,0x01,0xFF,0xFE},
  160. /* character 0x0056 ('V'): (width=8, offset=112) */
  161. {0xF8,0xFE,0x07,0x07,0xFE,0xF8},
  162. /* character 0x0057 ('W'): (width=8, offset=128) */
  163. {0xFF,0x03,0x3C,0x3C,0x03,0xFF}, 
  164.    {0x11,0x0a,0x04,0x0a,0x11},  //X
  165.    {0xC0,0x60,0x1F,0x1F,0x60,0xC0},  //Y
  166.    {0XDF,0XDF,0XDF,0XDF,0XDF,0XDF},  //Z
  167.    {0x00,0x1f,0x11,0x11,0x00},  //
  168.    {0x10,0x08,0x04,0x02,0x01},  //
  169.    {0x00,0x11,0x11,0x1f,0x00},  //
  170.    {0x04,0x08,0x10,0x08,0x04},  //
  171.    {0x01,0x01,0x01,0x01,0x01},  //
  172.    {0x00,0x00,0x10,0x08,0x00},  //
  173.    {0x12,0x15,0x15,0x15,0x0f},  //a
  174.    {0x1f,0x09,0x09,0x09,0x06},  //b
  175.    {0x0e,0x11,0x11,0x11,0x0a},  //c
  176.    {0x06,0x09,0x09,0x09,0x1f},  //d
  177.    {0x0e,0x15,0x15,0x15,0x0d},  //e
  178.    {0x0f,0x14,0x14,0x10,0x10},  //f
  179.    {0x09,0x15,0x15,0x15,0x0e},  //g
  180.    {0x1f,0x08,0x08,0x08,0x07},  //h
  181.    {0x00,0x00,0x17,0x00,0x00},  //i
  182.    {0x01,0x01,0x01,0x01,0x1e},  //j
  183.    {0x1f,0x04,0x04,0x0a,0x11},  //k
  184.    {0x1e,0x01,0x01,0x01,0x01},  //l
  185.    {0x0f,0x10,0x0f,0x10,0x0f},  //m
  186.    {0x1f,0x10,0x10,0x10,0x0f},  //n
  187.    {0x0e,0x11,0x11,0x11,0x0e},  //o
  188.    {0x1f,0x12,0x12,0x12,0x0c},  //p
  189.    {0x0c,0x12,0x12,0x12,0x1f},  //q
  190.    {0x1f,0x08,0x10,0x10,0x08},  //r
  191.    {0x09,0x15,0x15,0x15,0x12},  //s
  192.    {0x1e,0x09,0x09,0x01,0x02},  //t
  193.    {0x1e,0x01,0x01,0x02,0x1f},  //u
  194.    {0x18,0x06,0x01,0x06,0x18},  //v
  195.    {0x1e,0x01,0x1e,0x01,0x1e},  //w
  196.    {0x1b,0x04,0x04,0x04,0x1b},  //x
  197.    {0x19,0x05,0x05,0x05,0x1e},  //y
  198.    {0x11,0x13,0x15,0x19,0x11},  //z
  199.    {0x00,0x04,0x0e,0x11,0x00},  //
  200.    {0x00,0x00,0x1f,0x00,0x00},  //
  201.    {0x00,0x11,0x0e,0x04,0x00},  //
  202.    {0x08,0x10,0x08,0x04,0x08},  //
  203.    {0x00,0x00,0x00,0x00,0x00}   //
  204. };
  205. unsignedchar column[41]=
  206. {0
  207.   
  208. };//display memory, cleared before used.
  209. void delayms(unsignedint ms)//just about 1ms
  210. {
  211.    unsignedint n;
  212.    unsignedint i;
  213.    for(n=0; n8) index=1;
  214.  
  215.    //column
  216.   tmp1=rowtable[index];
  217.    for(i=1; i<41; i++)
  218.    {
  219.    Cdata=!(column[i]& tmp1);
  220.    Cclock=0;
  221.    Cclock=1;
  222.    }
  223.    //row
  224.    Clatch=0;
  225.    Clatch=1;
  226.    switch(index)
  227.    {
  228.    case1:
  229.    Row1=0;
  230.    break;
  231.    case2:
  232.    Row2=0;
  233.    break;
  234.    case3:
  235.    Row3=0;
  236.    break;
  237.    case4:
  238.    Row4=0;
  239.    break;
  240.    case5:
  241.    Row5=0;
  242.    break;
  243.   case6:
  244.    Row6=0;
  245.    break;
  246.    case7:
  247.    Row7=0;
  248.    break;
  249.    case8:
  250.    Row8=0;
  251.    break;
  252.    }
  253.   ET0=1;
  254. }
  255. void LED_put_byte(unsignedint inp)
  256. {
  257.    unsignedchar i;
  258.    for(i=1;i<41;i++) column[i]=column[i+1];
  259.   column[40]=inp;
  260. }
  261. void LED_puts(unsignedchar*lcd_string)
  262. {
  263.    unsignedchar i,tmp_chr;
  264.    while(*lcd_string)
  265.    {
  266.   tmp_chr=*lcd_string;
  267.    for(i=0;i<6;i++)
  268.    {
  269.   LED_put_byte(font[tmp_chr-32][i]);
  270.   delayms(shift_delay);
  271.    }
  272.   LED_put_byte(0);//space between character
  273.   delayms(shift_delay);
  274.   lcd_string++;
  275.    }
  276. }
  277. void main()
  278. {
  279.    unsignedchar m[40], i;
  280.   TMOD=0x20;// Timer 1, mode-2 (8-bit auto reload)
  281.   TH1=0xFA;//9600 baud rate
  282.   SCON=0x50;
  283.   TR1=1;//start timer 1
  284.   
  285.    /* read 10 bytes or till enter key */
  286.    for(i =0; i <240; i++){
  287.    while(RI ==0);//wait to receive data
  288.    if(SBUF =='\r')
  289.    break;
  290.   m[i]= SBUF;// save value of data
  291.   RI =0;
  292.    }
  293.   m[i]='\0';
  294.   init_timer();
  295.   shift_delay=50;//bigger = slower shift
  296.    while(1){
  297.    // display m
  298.   LED_puts(m);
  299.    }
  300. }

 

 

and the attempt does not work on arm

#include <lpc213x.h>
#include <stdio.h>

unsigned int shift_delay;
const unsigned char  font[96][16] =
{
   /* character 0x0020 (' '): (width=7, offset=0) */
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00},

/* character 0x0021 ('!'): (width=8, offset=14) */
{0XFF,0XE,0X78,0X78,0XE0,0XFF},

/* character 0x0022 ('"'): (width=8, offset=30) */
{0x00, 0xE0, 0xE0, 0x00, 0x00, 0xE0, 0xE0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},

/* character 0x0023 ('#'): (width=8, offset=46) */
{0x00, 0x22, 0xFF, 0xFF, 0x22, 0xFF, 0xFF, 0x22,
0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x00},

/* character 0x0024 ('$'): (width=8, offset=62) */
0x00, 0x61, 0xF1, 0x98, 0x8C, 0xC7, 0x43, 0x00,
0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00,

/* character 0x0025 ('%'): (width=8, offset=78) */
{0xC0, 0xE3, 0x26, 0xED, 0xDB, 0x32, 0x63, 0x01,
0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x80},

/* character 0x0026 ('&'): (width=8, offset=94) */
{0x00, 0x6F, 0xFF, 0x90, 0xF4, 0x67, 0x07, 0x04,
0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80},

/* character 0x0027 ('''): (width=8, offset=110) */
{0x00, 0x00, 0x00, 0xE0, 0xE0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x00, 0x00, 0x03, 0x0F, 0x1C, 0x10, 0x00, 0x00,
0x00, 0x00, 0xE0, 0xF8, 0x1C, 0x04, 0x00, 0x00},

  
/* character 0x0029 (')'): (width=8, offset=0) */
{0x00, 0x00, 0x10, 0x1C, 0x0F, 0x03, 0x00, 0x00,
0x00, 0x00, 0x04, 0x1C, 0xF8, 0xE0, 0x00, 0x00},

/* character 0x002A ('*'): (width=8, offset=16) */
{0x00, 0x01, 0x05, 0x07, 0x03, 0x07, 0x05, 0x01,
0x00, 0x00, 0x40, 0xC0, 0x80, 0xC0, 0x40, 0x00},

/* character 0x002B ('+'): (width=8, offset=32) */
{0x00, 0x01, 0x01, 0x07, 0x07, 0x01, 0x01, 0x00,
0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00},

/* character 0x002C (','): (width=8, offset=48) */
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x34, 0x3C, 0x38, 0x00, 0x00},

/* character 0x002D ('-'): (width=8, offset=64) */
{0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},

/* character 0x002E ('.'): (width=8, offset=80) */
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x00, 0x00},

/* character 0x002F ('/'): (width=8, offset=96) */
{0x00, 0x00, 0x00, 0x01, 0x07, 0x1E, 0x18, 0x00,
0x00, 0x18, 0x78, 0xE0, 0x80, 0x00, 0x00, 0x00},

/* character 0x0030 ('0'): (width=8, offset=112) */
{0x00, 0x00, 0x0F, 0x1F, 0x10, 0x16, 0x1F, 0x0F,
0x00, 0x00, 0xE0, 0xF0, 0xD0, 0x10, 0xF0, 0xE0},

/* character 0x0031 ('1'): (width=8, offset=128) */
{0x00, 0x04, 0x04, 0x0C, 0x1F, 0x1F, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00},

/* character 0x0032 ('2'): (width=8, offset=144) */
{0x00, 0x0C, 0x1C, 0x10, 0x11, 0x1F, 0x0E, 0x00,
0x00, 0x30, 0x70, 0xD0, 0x90, 0x10, 0x10, 0x00},

/* character 0x0033 ('3'): (width=8, offset=160) */
{0x00, 0x0C, 0x1C, 0x11, 0x11, 0x1F, 0x0E, 0x00,
0x00, 0x60, 0x70, 0x10, 0x10, 0xF0, 0xE0, 0x00},

/* character 0x0034 ('4'): (width=8, offset=176) */
{0x00, 0x00, 0x1F, 0x1F, 0x00, 0x07, 0x07, 0x00,
0x00, 0xC0, 0xC0, 0x40, 0x40, 0xF0, 0xF0, 0x40},

/* character 0x0035 ('5'): (width=8, offset=192) */
{0x00, 0x1F, 0x1F, 0x11, 0x11, 0x11, 0x10, 0x00,
0x00, 0x10, 0x10, 0x10, 0x30, 0xE0, 0xC0, 0x00},

/* character 0x0036 ('6'): (width=8, offset=208) */
{0x00, 0x03, 0x07, 0x1E, 0x1A, 0x13, 0x01, 0x00,
0x00, 0xE0, 0xF0, 0x10, 0x10, 0xF0, 0xE0, 0x00},

/* character 0x0037 ('7'): (width=8, offset=224) */
{0x00, 0x10, 0x10, 0x11, 0x17, 0x1E, 0x18, 0x00,
0x00, 0x00, 0x70, 0xF0, 0x80, 0x00, 0x00, 0x00},
  /* character 0x0038 ('8'): (width=8, offset=0) */
{0x00, 0x0E, 0x1F, 0x13, 0x11, 0x1F, 0x0E, 0x00,
0x00, 0xE0, 0xF0, 0x10, 0x90, 0xF0, 0xE0, 0x00},

/* character 0x0039 ('9'): (width=8, offset=16) */
{0x00, 0x0F, 0x1F, 0x10, 0x10, 0x1F, 0x0F, 0x00,
0x00, 0x00, 0x90, 0xB0, 0xF0, 0xC0, 0x80, 0x00},

/* character 0x003A (':'): (width=8, offset=32) */
{0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x00, 0x00,
0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x00, 0x00},

/* character 0x003B (';'): (width=8, offset=48) */
{0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x00, 0x00,
0x00, 0x00, 0x00, 0x34, 0x3C, 0x38, 0x00, 0x00},

/* character 0x003C ('<'): (width=8, offset=64) */
{0x00, 0x01, 0x03, 0x06, 0x0C, 0x18, 0x10, 0x00,
0x00, 0x00, 0x80, 0xC0, 0x60, 0x30, 0x10, 0x00},

/* character 0x003D ('='): (width=8, offset=80) */
{0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00,
0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00},

/* character 0x003E ('>'): (width=8, offset=96) */
{0x00, 0x10, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x00,
0x00, 0x10, 0x30, 0x60, 0xC0, 0x80, 0x00, 0x00},

/* character 0x003F ('?'): (width=8, offset=112) */
{0x00, 0x0C, 0x1C, 0x11, 0x13, 0x1E, 0x0C, 0x00,
0x00, 0x00, 0x00, 0xB0, 0xB0, 0x00, 0x00, 0x00},

/* character 0x0040 ('@'): (width=8, offset=128) */
{0x0F, 0x1F, 0x10, 0x11, 0x13, 0x12, 0x1F, 0x0F,
0xE0, 0xF0, 0x10, 0x90, 0xD0, 0x50, 0xD0, 0xD0},

/* character 0x0041 ('A'): (width=8, offset=144) */
{0x7F, 0xFF, 0x88, 0x88, 0xFF, 0x7F
}, 

/* character 0x0042 ('B'): (width=8, offset=160) */
{0xFF, 0xFF, 0x81, 0x99, 0xDB, 0x7E},

/* character 0x0043 ('C'): (width=8, offset=176) */
{0xFF, 0xFF, 0x81, 0x81, 0xC3, 0xC3},

/* character 0x0044 ('D'): (width=8, offset=192) */
{0xFF, 0xFF, 0xC3, 0xC3, 0x7E, 0x3C},

/* character 0x0045 ('E'): (width=8, offset=208) */
{0xFF, 0xFF, 0xDB, 0xDB, 0xDB, 0xC3},

/* character 0x0046 ('F'): (width=8, offset=224) */
{0xFF, 0xFF, 0x88, 0x88, 0x88, 0x80},

/* character 0x0047 ('G'): (width=8, offset=240) */
{0x7E, 0xFF, 0x81, 0x89, 0xEF, 0x6F},

/* character 0x0048 ('H'): (width=8, offset=256) */
{0xFF, 0xFF, 0x08, 0x08, 0xFF, 0xFF},

/* character 0x0049 ('I'): (width=8, offset=272) */
{0xC3, 0xC3, 0xFF, 0xFF, 0xC3, 0xC3},

/* character 0x004A ('J'): (width=8, offset=288) */
{0x06, 0x07, 0x01, 0x01, 0xFF, 0xFE},

/* character 0x004B ('K'): (width=8, offset=304) */
{0xFF, 0xFF, 0x18, 0x3C, 0x66, 0xC3},

/* character 0x004C ('L'): (width=8, offset=320) */
{0xFF, 0xFF, 0x03, 0x03, 0x03, 0x03}, 

/* character 0x004D ('M'): (width=8, offset=336) */
{0XFF,0XE0,0X78,0X78,0XE0,0XFF},

/* character 0x004E ('N'): (width=8, offset=352) */
{0xFF, 0xFF, 0x38, 0x1C, 0xFF, 0xFF},
   /* character 0x004F ('O'): (width=8, offset=0) */
{0x7E, 0xFF, 0x81, 0x81, 0xFF, 0x7E},

/* character 0x0050 ('P'): (width=8, offset=16) */
{0xFF, 0xFF, 0xD8, 0xD8, 0xF8, 0xF8},

/* character 0x0051 ('Q'): (width=8, offset=32) */
{0x7E, 0xC3, 0x81, 0x85, 0xC2, 0x7D},

/* character 0x0052 ('R'): (width=8, offset=48) */
{0xFF, 0xFF, 0x88, 0x8C, 0xFF, 0x73},

/* character 0x0053 ('S'): (width=8, offset=64) */
{0x72, 0xF3, 0xDB, 0xDB, 0xCF, 0x46},

/* character 0x0054 ('T'): (width=8, offset=80) */
{0xC0, 0xC0, 0xFF, 0xFF, 0xC0, 0xC0},

/* character 0x0055 ('U'): (width=8, offset=96) */
{0xFE, 0xFF, 0x01, 0x01, 0xFF, 0xFE},

/* character 0x0056 ('V'): (width=8, offset=112) */
{0xF8, 0xFE, 0x07, 0x07, 0xFE, 0xF8},

/* character 0x0057 ('W'): (width=8, offset=128) */
{0xFF, 0x03, 0x3C, 0x3C, 0x03, 0xFF}, 
    {0x11, 0x0a, 0x04, 0x0a, 0x11},  //X
    {0xC0, 0x60, 0x1F, 0x1F, 0x60, 0xC0},  //Y
    {0XDF,0XDF,0XDF,0XDF,0XDF,0XDF},  //Z
    {0x00, 0x1f, 0x11, 0x11, 0x00},  //
    {0x10, 0x08, 0x04, 0x02, 0x01},  //
    {0x00, 0x11, 0x11, 0x1f, 0x00},  //
    {0x04, 0x08, 0x10, 0x08, 0x04},  //
    {0x01, 0x01, 0x01, 0x01, 0x01},  //
    {0x00, 0x00, 0x10, 0x08, 0x00},  //
    {0x12, 0x15, 0x15, 0x15, 0x0f},  //a
    {0x1f, 0x09, 0x09, 0x09, 0x06},  //b
    {0x0e, 0x11, 0x11, 0x11, 0x0a},  //c
    {0x06, 0x09, 0x09, 0x09, 0x1f},  //d
    {0x0e, 0x15, 0x15, 0x15, 0x0d},  //e
    {0x0f, 0x14, 0x14, 0x10, 0x10},  //f
    {0x09, 0x15, 0x15, 0x15, 0x0e},  //g
    {0x1f, 0x08, 0x08, 0x08, 0x07},  //h
    {0x00, 0x00, 0x17, 0x00, 0x00},  //i
    {0x01, 0x01, 0x01, 0x01, 0x1e},  //j
    {0x1f, 0x04, 0x04, 0x0a, 0x11},  //k
    {0x1e, 0x01, 0x01, 0x01, 0x01},  //l
    {0x0f, 0x10, 0x0f, 0x10, 0x0f},  //m
    {0x1f, 0x10, 0x10, 0x10, 0x0f},  //n
    {0x0e, 0x11, 0x11, 0x11, 0x0e},  //o
    {0x1f, 0x12, 0x12, 0x12, 0x0c},  //p
    {0x0c, 0x12, 0x12, 0x12, 0x1f},  //q
    {0x1f, 0x08, 0x10, 0x10, 0x08},  //r
    {0x09, 0x15, 0x15, 0x15, 0x12},  //s
    {0x1e, 0x09, 0x09, 0x01, 0x02},  //t
    {0x1e, 0x01, 0x01, 0x02, 0x1f},  //u
    {0x18, 0x06, 0x01, 0x06, 0x18},  //v
    {0x1e, 0x01, 0x1e, 0x01, 0x1e},  //w
    {0x1b, 0x04, 0x04, 0x04, 0x1b},  //x
    {0x19, 0x05, 0x05, 0x05, 0x1e},  //y
    {0x11, 0x13, 0x15, 0x19, 0x11},  //z
    {0x00, 0x04, 0x0e, 0x11, 0x00},  //
    {0x00, 0x00, 0x1f, 0x00, 0x00},  //
    {0x00, 0x11, 0x0e, 0x04, 0x00},  //
    {0x08, 0x10, 0x08, 0x04, 0x08},  //
    {0x00, 0x00, 0x00, 0x00, 0x00}   //
};
unsigned char column[41]=
{
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
}; //display memory, cleared before used.
void delayms(unsigned int ms) //just about 1ms
{
    unsigned int n;
    unsigned int i;
    for (n=0; n<ms; n++)
    {
        for (i=0; i<100; i++);
    }
}

void init_timer(void)

{
__irq void Timer0_IRQ(void); 

IODIR0=(1 << 3) | (1 << 4)| (1 << 5)| (1 << 6)| (1 << 7)| (1 << 8)| (1 << 9)| (1 << 10)| (1 << 1)| (1 << 0);
IODIR1|=(1 << 16);
T0PR = 0x00000000;
T0MR0 = 375000L;
T0MCR = 3;
T0TC = 0x00;
T0TCR = 0x00000001;
VICVectAddr4 = (unsigned)Timer0_IRQ;
VICVectCntl4 = (0x20 | 4);
VICIntEnable = (1 << 4);


}
__irq void Timer0_IRQ(void)

{


unsigned int index;
unsigned int i,tmp1;
const unsigned char rowtable[]={0,1,2,4,8,16,32,64,128};
 
IOSET0|= (1 << 3) | (1 << 4)| (1 << 5)| (1 << 6)| (1 << 7)| (1 << 8)| (1 << 9)| (1 << 10);
index++;
if (index>8) index=1;
tmp1=rowtable[index];
for (i=1; i<41; i++)

 

{
IOPIN1=!(column[i] & tmp1);

IOCLR0=(1 << 0);
IOSET0=(1 << 0);
}
IOCLR0=(1 << 1);
IOSET0=(1 << 1);
switch (index)
{
case 1: IOPIN0&=(1 << 10);
break;
case 2: IOPIN0&=(1 << 9);
break;
case 3: IOPIN0=(1 << 8);
break;
case 4: IOPIN0=(1 << 7);
break;
case 5: IOPIN0=(1 << 6);
break;
case 6: IOPIN0=(1 << 5);
break;
case 7: IOPIN0=(1 << 4);
break;
case 8: IOPIN0=(1 << 3);
break;
T0IR = (1UL<<0);
VICIntEnable = 0X00;
}
 
}

void LED_put_byte(unsigned int inp)
{
unsigned char i;
for (i=1;i<41;i++)
column[i]=column[i+1];
column[40]=inp;
}
void LED_puts(char *lcd_string)
{
unsigned char i,tmp_chr;
while (*lcd_string)
{
tmp_chr=*lcd_string;
for (i=0;i<6;i++)
{
LED_put_byte(font[tmp_chr-32][i]);
delayms(shift_delay);
}
LED_put_byte(0);
delayms(shift_delay);
lcd_string++;
}
}
int main()
{

init_timer();

 
shift_delay=100;
{
LED_puts("8x32 Matrix LED: AT89C2051, 74HC595");
}
}

Re: Memcpy

$
0
0

Is the address returned by malloc valid on your platform? Have you correctly configured the heap in the C library init routine?

Re: Design Start ARM Cortex-M0

$
0
0

Hi,

 

Regarding (4), If you are only just doing FPGA prototype, yes, you can have initial values in the SRAM. There is no different from program memory which you have created. But if you are doing actual silicon chips, it is unlikely that you can do this.

 

Now, for the rest of the questions: may I ask you, is this a student project or commercial project?

If you are working in a commercial environment, I would recommend you to first take some additional training course to gain better understanding of the ARM architecture first. There are a number of ARM approved training centers, offering both hardware and software training courses.

See Training - ARM for details.

 

If you are a student, I think you might be better off to discuss with your lecturer and see if you can get additional support from your own lecturers or tutors.  For details on ARM architecture, your university/college might be able to get support via the ARM University Program - ARM. Please understand that people like Simon, me and other contributors are just "helping out" in this forum from time to time and cannot (and impossible for us to) spend too much time supporting all support requests. As you are a beginner, I don't think it will be possible to guide you to design a AHB to I2C interface module here.

 

regards,

Joseph

Re: Memcpy

$
0
0

Peter,

 

   Yes, the address returned by malloc is perfectly valid and it is working fine when I initially added small piece of code, but later when 've added few more files and also I've modified the scatter file as below and configured the heap here.

  APP_DATA +0

  {

        * (+RW, +ZI)            ; Application RW (.data) and ZI (.bss) data

    }

 

 

  ARM_LIB_HEAP  0x00040000 EMPTY  0x05FC0000 ; Application heap

  { }

 

 

  ARM_LIB_STACK 0x07000000 EMPTY -0x01000000 ; Application (SVC mode) stack

  { }

 

 

  IRQ_STACK     0x08000000 EMPTY -0x01000000 ; IRQ mode stack

  { }

 

 

  TTB     0x09000000 EMPTY 0x40000            ; Level-1 Translation Table for MMU

  { }

}

Re: Design Start ARM Cortex-M0

$
0
0

Hi,

  For now We are only doing FPGA prototyping. and  our project is a student project  under ARM university program.  We are also in contact with Mr. Sadanand Gulwadi  ARM University Program Manager Bangalore INDIA. 

 

We did not  took any training course but I read your book A definitive guide to cortex M0 and also M3 for understanding ARM architecture.  But Implementation detail for these AMBA BUS architecture and adding peripheral around cortex M0 I did not find those details.

 

Actually What We needed for now is that whatever we did using LPC1768 (with cortex M3) on a breadboard. same thing we wanted to using FPGA with cortex M0 core running on it. 

  Thanks

regards

Re: Design Start ARM Cortex-M0

$
0
0

Hi Vivek,

 

 

Good to know that you are already working with the university program. I will contract them to see if there is anything they can do to help.

 

My books are focus on MCU users, so it doesn't cover Cortex-M hardware (e.g. AHB anf FPGA) design topics.

 

Regarding sampling analog inputs, there are several options you should consider:

- if the two analogue inputs are stero audio inputs (L+R channels), maybe you should use I2S protocol instead. It is much easier than I2C. (Just some serial to parallel shift registers and a simple FSM).

- You can use ADC with parellel interface (there is a AHB GPIO module in the EDK).

- You can use GPIO to create bit banging operations to emulate I2C operations, which will then allow you to connect the system to a I2C module. But this means you need to have good understanding of the I2C protocol to do that.

 

regards,

Joseph

Re: how to utilize interrupts in arm9 processors..? what is residing inside ISR..?


lp64 / llp64 model for ARMv8

$
0
0

hi, experts:

Gcc compilers support LP64 model, and Microsoft VC++ supports LLP64 model.

 

So, my question is:

armcc / gcc :

Does it have an compiler option to let user select LP64 or LLP64 model when compiling a program?

 

best wishes,

Re: Design Start ARM Cortex-M0

$
0
0

Hi Vivek

 

It is good to see you getting in touch with ARM University Program.

 

We are currently offering a variety of teaching materials, however most of them are only available for educators (professors, lectures etc). You are welcome to suggest your supervisor or professor to adopt ARM-based teaching material to set up courses or labs.

 

To do that, they simply need to go to:

www.arm.com/university

click "educator", and then "Register for ARM University Program Today"

 

We will also have some materials open for students shortly, you could follow the same steps but select "student" rather than "educator".

 

For any enquiry please contact: university@arm.com

 

Thank you

 

Sean Hong

ARM University Program

Re: lp64 / llp64 model for ARMv8

$
0
0

Hi chinatiger,

 

Compiling for Windows requires more than just the integer sizes to match; it uses a different object format too (COFF, not ELF), which armcc doesn't support.

 

HTH,
Pete

DS-5 Debugger hang issue, while debugging c/c++ application on Baremetal cortex-A8 using RTSM model?

$
0
0

I am using DS5 Evaluation version. I am trying to debug baremetal cortex-A8 executable.The debugger freezes when it tries to connect with Baremetal Cortex-A8 RTSM model?

How to resolve the hang issue?

Re: These is an issue regarding the power management option

$
0
0

Actually the full source code is facing problem with power management option which later faced problem in the phones such as:

1. The lock button doesn't work and the only solution is to remove the battery and switch on back......

2. On application overloading there is auto reboot of the device

 

So to minimize this issue in the device I am doing research on this and trying to overcome this problem......

The issue is in .config file of the source kernel for rowboat-jb-4.3-am437x kernel........ !

Viewing all 8551 articles
Browse latest View live