Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

ARM questions

Status
Not open for further replies.

Dr_Doggy

Well-Known Member
I recently watched this:

and they say in the first section that most of these devices use ARM and linux. and are accessing them via uart ports
this brings some question though,

1)if Linux is able to run on a arm device, then does that must mean that these chips are big enough for a whole os? it seems like overkill to have a whole os running a fridge.

2) Also it seems like they are just using the uart port for dump & cmd info as oppose to ICSP?

3) does this mean that if I get to the uart port im just calling pre programmed instructions?

4) what exactly is jail breaking then, and what good will accessing uart do me, am i able to use/modify their header/c files for myown code, or do i still need to start from scratch if i want to reprogram device? ie simple things like adding a line to change ferinheit to celcius.

5) also this is for educational purposes for now, but is doing this stuff illegal?
 
Most routers use "an entire OS" like DSL because it supports all the IO and UX easily with browser setup pages.

With the cost breakthru on Mega's other 4&8 bit CPU's used are getting overlooked for the value-added "smart" features. Like .. Hmm ... which hidden items are getting near the expiry date?

Jailbreaking as in iPads and Androids means the freedom to load or roll your own OS with Root or Admin privvies to add features and then Break out or "Brick it!" Depending on what Apple, Google or 3rd party apps do.
 
  • Like
Reactions: jjw
so where am i when i get to the shell cmd promt, is this still the linux os? with the fridge for example, if i wanted to change a few features what would be involved? and why would i want to stop at the shell cmd prompt? if i were recoding this, wouldnt it be smarter to load the Linux platform, then stop the api from the desktop, and recode from there?

It just seems to me that the uart console is just running a plugin code, to execute pre-programed manufacture settings/options, and not really recoding, am i correct? And this is where the option is to upload myown firmware?

Also how would i compile myown said firmware to upload, if the celcius to f class is not there to call, that would essentially mean i'd have to rewrite the whole thing? What would i use to compile such firmware? Would i need to start from scratch?
 
FWIW:

ASUS typically has open firmware to one of their routers. What's wild, is there appears to be a synergistic relationship with ASUS and a guy modifying their OS. His motto, is to "fix" what he thinks is broken and to add some features, I do plan to run his firmware. Right now, I have a stock router that's running as a repeater.

It's not like an entirely different firmware running on some routers. Broadcom like to close the source and documentation.

In this case, it isn't quite hacking in.
 
At least for now, US carrier have to unlock the cell phone when asked with some restrictions.

Jailbreaking or essentially obtaining "root" access allows you to install your own applications onto the phone.

At the first level, usually it is to remove the "locked to a specific carrier" restriction.

The second level is the ability to install apps not from the app store etc.

The Motorola Razor had a option that I haven't seen for a while. It could be used as a modem and/or PPP connection. I did modify/fix a modem script on MAC OS9 to allow that to happen.

There is an app that does internet connections all through http, so it really can't be blocked. The onl phone hack I did for a while, was making an external PPP connection think it was from the phone.

I experimented with something unsuccessfully where the wireless connection was restricted to http and of course wireless wasn't, so I tried to have concurrent sessions with no luck.
 
The Motorola Razor had a option that I haven't seen for a while. It could be used as a modem and/or PPP connection. I did modify/fix a modem script on MAC OS9 to allow that to happen.
There is an app that does internet connections all through http, so it really can't be blocked. The only phone hack I did for a while, was making an external PPP connection think it was from the phone.

But for the second thing, how did you go about it, it is sounding like jailbreak is just changing options manufactures have set in code before going to specific vendor(restricted from user level). the first example sounds interesting, but again i wonder if you are actually rewriting code, or just settings again.

1)Here is my thought, I have a phone, that got dropped, few small cracks in the screen and now touchscreen does not work. My thinking is that the screen , bluetooth, and audio jack work fine still. Am I able to erase everything, load up myown driver.h/(.dll) for periphals then .C to run off boot, without loading android OS, like how i would do with a blank microcontroller?

AND to extend this question could i do this with my 64-bit PC, rewrite the boot sector and run my own code without windows, much like old floppies b4 windows, and run my own graphics drivers and such?

2) Also I keep looking at these smaller devices, such as Refrigerators and Light bulbs with WiFi, am i corect in assumeing that Uart console is still just executing pre-programed files/settings, and if the instruction is not there i will need to rewrite it, for example in my CtoF code i just need to add the line F = C× 9/5 + 32, but how would i go about it, is it a matter of just opening and adding the line to an existing .h/.dll and uploading, or if its compiled in, I need to redo the whole app layer, and leave linux os? or do i go as far as redoing the whole program, from boot to final (but that would loose linux and console app too!?)
 
#1 & 2
I had to think back. I had the CSD option which would allow me to use the phone to dial a modem/fax/PPP machine without hanging up. I had the pre OSX Mac and the modem scripts were messed up, so I fixed them on the MAC. So, I either fixed them or modified the internal settings to work with the RAZR. It was too long ago. This was PPP before DSL ever existed. I had free PPP trough work. See https://rickysays.com/cell-phone-as-a-laptop-modem for OSX.

When I had my first cellular plan I had unlimited data and I THINK the people that bought it changed the plan so using the tethering option was a separate cost option. When I upgraded my phone to a smart phone, the unlimited went away. There was a Windoze app provided by the carrier that allowed the phone to use the 3G data network. It would not work or it did until the carrier separated the tethered and phone data. I bought another app that allowed you to change the APN, so when the APN was the phones APN it allowed it to think that it was using the phones unlimited data.

So, in one case I modified the modem script on the MAC computer to support the RAZR and in the other, I just modified the APN settings in the computer APP. One used PPP and the other the Edge/3G network. The RAZR natively supports a modem chip set. ie. AT commands through USB and Bluetooth. The Cellular extensions is a nightmare to wade through.

Later I migrated to an Android phone and used an app called PDANET whiche requires an APP ont he PC and an APP on Android with Androide set to USB debug mode. It's a one-time pay app. It uses. my 2 GB of data per month that I pay extra for.

So, the RAZR supported a modem direct through the USB port and you needed applications to access the photos etc. Android basically can treat the USB device as a USB hard drive and through debug mode other options are made available.

Now, I'm using Linux and I have an Clear device that acts as an 802.xx AP. I can purchase plans for hours, days, weeks or a month at a time, so it's a back-up device.
With Windows, i would have a backup device and a limited 2 GB/month

There was one glitch with the Android device and tethering with PDANET. The phone gave out because USB charing would not keep up, The Android phone was made by Motorola (Backflip) and the RAZR and I think the backflip required special cables with data pull-ups to enable the fast charging;

I did try a USB Isolator with again no luck. I now have a plug-in USB monitor that will measure current/power etc. So, for using it in the car for a long time won't work.
The RAZR based on the engineering manual had three charging rates. The RAZR needs a keyboard which I have somewhere. The Backflip is so obsolete, it runs like android 2.6. It can't play videos. I do have an external device that will back up a SIM card to itself.

The Clear device does work well by the window, so sometimes I ave to use a 20' USB extension.

ASIDE: I have been planning a wireless AC upgrade with repeater for some time. The wireless ac card I have won;t work in the Linux version I have without recompiling the Kernal. The new routers have not been installed and I don;t have easy access to a wired Ethernet connection. The Laptop doesn't have a GB Ethernet connection. Believe it or not, I am using an ancient Snow Airport with a bad internal; b card, but with an external g access point. I have 3 repeaters, but I used to have 2. The 3rd repeater is one of the planned upgrade routers and it will repeat the b/g as n but at g speeds. I might be able to use a USB stick as a Clear backup on the new modems, but won't be able to reposition the antenna easily. Well, maybe if I used an active extension, but it would be at the basement level. The Apple router natively allowed wireless b under PPP. In theory, I would have had the PPP free connecton until discontinued. At one point, I set up a "man in the middle" "attack" so could access a highly restricted server from outside. I did have legitimate access to this server from home, but it was cumbersome. I had to VPN and login to the public server and then ssh into the restricted server. To get a file,I would have to transfer it to the public server (scp) and then from the public server to home (scp). I used cygwin running on a PC at work. It was still secure because you needed VPN access to work AND the MAC address of the outside PC had to be registered. Access was limited to two subnets via ssh and one subnet using SAMBA. SAMBA would not pass through any other router. The other subnet was the public access machine. VPN came in on a totally separate subnet,
 
Your (1) and (2):

There has to be a way to debug and/or get the firmware in there in the first place. In manufacturing, it could be a bed of nails. Take the JP1 IR remote controls, there is a programming header sometimes installed, sometimes not. In open source devices, the firmware can be gotten in source form. How to recompile and install doesn't seem to be part of the requirement.

Broadcom. for instance, severely restricts any info related to low level access. You have to use their API and that documentation is even restricted.

There have been instances where network access has been achieved because of holes in say a light bulb application.

AND to extend this question could i do this with my 64-bit PC, rewrite the boot sector and run my own code without windows, much like old floppies b4 windows, and run my own graphics drivers and such?

No question that you can't. The BIOS is what the "OS" calls and that is in the firmware of the laptop, HOWEVER, the details of some things are left hidden. For instance, how the backlight works on a Toshiba laptop, Linux can't use it because someone hasn't reverse engineered it yet. ACPI is a new interface that supports battery management and other stuff. See: **broken link removed**

So, some key has to be trapped to enable/disable the backlight and some backlight paramters have to somehow be set through an application. e.g.How long to backlight. This is most likely set through the I2C bus internal to the laptop. It's also a BIOS enabled option.

I did, somehow, manage to install a backlit KB to a Toshiba laptop and it did eventually work in Windows, but I'm not sure if it was because it was sent in for repair and they enabled it in the BIOS or what.
 
glad you said that, the IR remote is what got me down this hole in the first place, it started when i did a robot and programmed its IR receiver to run off of a remote that a boss uses for his equipment. One time i brought this robot to training with me, and when I showed trainer this he jumped out of his socks. Unfortunately he was not as impressed when i explained what i had done, I think he thought that i actually reprogrammed the entire remote, unfortunately this presents a challenge for me to accomplish. So i took off plastic and first thing i found was that jtag(2 i think), after looking this seems to be more for uploading IR codes database for different models, not really what i want to study though, but interesting, especially now that all devices are showing this common trend with the uart.

And actually this lead me to the bed of nails you mentioned where manufacture is uploading, except on my remote, more like pads and separated across the board, so you need very special shape plug, tricky! but i was able to pull datasheet and confirm ICSP pins for a MAXQ! I guess I wanted to confirm that all mcu devices were like this.


Also I wonder why you say no to pc's, I realise now they are a bit different, so if I get it, first I turn pc on, then: core gets activated, does nothing else but sets up bios port, loads and runs bios file, bios file has all the headers that loads all ports(including uart)/disks and runs bootsector, from there it loads and executes linux from HD. then linux startup runs end user application?


Also in the example of the Toshiba, if i only wanted to use the backlight i could compile &load simple instruction set, such as "when reset button pushed, toggle backlight port", but without rest of BIOS code it would not load HD or anything else, also would i be able to reload more new firmware after that? ie how do i upload firmware to a blank bios chip?

now is this BIOS firmware where the kernals are, and if so doesnt that mean that the kernal call structure needs to match the os implementation? win or linux?
or with a proper backlight fix(so OS is still useable) is it possible to add/mod a kernel to run after OS is loaded? Ie can i access processors core pins through an os platform even if unset in original kernels? but then again isnt that what drivers are? Also i read that BIOS contains the specifications for motheboard hardware configurations, but with win/linux, OS calls these directly on their own without bios, so how does OS determine different motherboard config types? or is that what chipset drivers are?


So what is best way to fix backlight? would it be best to fix in bios, but then we need to add operation structures in os aswell?
also if bios is hex like micorcontrollers, is it possible to decompile hex, add my line and then recompile?
or can we target backlight cpu pins all the way from desktop framework?


AND how do i go about programming an arm device, any good tutorials(a-z)?


am i correct with my assumptions?
 
Last edited:
A few things, before I go do some other stuff.

JP1 Remotes: http://en.wikipedia.org/wiki/JP1_remote

Bed of nails: **broken link removed**
A placeholder for a JP1 connctor, JTAG, ISCP, TTL serial may exist on a lot of embedded items. At the factory, they may be programmed using the "bed of nails" approach during testing to avoid installing the header. I have an embedded server that does have a USB and HDMI port, but their primary purpose is for recovery although the HDMI MIGHT be part of a media server app.

Way back when e.g. DEC minicomputers, there was a ROM BIOS of sorts. The RUN/HALT switch would get you into what was called ODT or an Octal Debugging Tool.
The BOOTLOADER would load in block0 of a device and it's code would load in the rest of whatever, The machines had the same start address. If you actually wanted to boot something that wasn't supported, you could "Toggle" using switches or later the console terminal a boot program and execute it. BOOT was nothing but the code to read block #0 of any device and execute that code. Errors could be detected by what address the program stopped at.

So now, you have something like wait for something on the serial port. If not found execute user app, otherwise execute bootloader or a console type device. With Linux, it's possible that the console device is always used. The "Break" key on older terminals would exactly that, it broke into the debugger, Break, I think was the reverse of the normal UART state for x amount of time.

more to come...
 
the OP said:
Also I wonder why you say no to pc's, I realise now they are a bit different, so if I get it, first I turn pc on, then: core gets activated, does nothing else but sets up bios port, loads and runs bios file, bios file has all the headers that loads all ports(including uart)/disks and runs bootsector, from there it loads and executes linux from HD. then linux startup runs end user application?

This is way beyond me, but this is where we are at:

https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface

I've updated the firmware on an old MAC and a relatively new PC. It may have been as simple as putting a file at a certain location, named a specific name and rebooting with a key combo or running a Windows program.
 
[quote = the OP] Also I wonder why you say no to pc's, I realise now they are a bit different, so if I get it, first I turn pc on, then: core gets activated, does nothing else but sets up bios port, loads and runs bios file, bios file has all the headers that loads all ports(including uart)/disks and runs bootsector, from there it loads and executes linux from HD. then linux startup runs end user application?[/quote]

This is way beyond me, but this is where we are at:

https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface

I've updated the firmware on an old MAC and a relatively new PC. It may have been as simple as putting a file at a certain location, named a specific name and rebooting with a key combo or running a Windows program.

PS: I found this https://www.eevblog.com/forum/testgear/flir-e4-thermal-imaging-camera-teardown/ to be a fascinating read.
 
have i shown this robot yet?
IMG_20130508_125308.jpgIMG_20130508_125556.jpg Scan.jpg

yes thats a coilgun, with its own microcontroller running boost converter, and encrypted trigger. (in rear)
IRrx is TSOP39338 straight to uC, 2 servos for drive, and 1 for rear

Remote has the jtag in center and more interesting are those pins at the bottom!

Very interesting that they open source the camera, it will be interesting to see where the new trends in technology lead from this.

especially now as i look around , everything has computer in it, and its funny how it all seems alot smaller (less complex!) with those 5 little pins!
 

Attachments

  • IMG_20130508_125544.jpg
    IMG_20130508_125544.jpg
    226.6 KB · Views: 458
Last edited:
ohya, and code:

EDIT: I have added better side view of robot, that mangled saw is the compact disk with teeth i carved out with solder iron, glued to servo for wheel
 

Attachments

  • REMOTE.c
    4.8 KB · Views: 418
  • ADS00001.BMP
    219.4 KB · Views: 458
  • ADS00002.BMP
    219.4 KB · Views: 431
  • ADS00003.BMP
    219.4 KB · Views: 439
  • ADS00004.BMP
    219.4 KB · Views: 420
  • ADS00005.BMP
    219.4 KB · Views: 454
Last edited:
Hi,

I want to program STM32F103 in which define an array that is completed with ADC value. I need to trigger the ADC with timer and also use DMA. It means that when the array complete, the DMA_IRQ Handler send this array by USART channel. I wrote this code but it doesn't work.

I would be appreciate if you help me to correct this program.

Code:
#include "stm32f10x.h"

#define ADC1_DR_Address    ((uint32_t)0x4001244C)
uint16_t array [32];
DMA_InitTypeDef DMA_InitStructure;

int main(void)
{
 
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1 | RCC_APB2Periph_AFIO, ENABLE);
  RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2, ENABLE);
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_USART1,ENABLE);
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC , ENABLE);
  RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1, ENABLE);                                            
   
  GPIO_InitTypeDef GPIO_InitStructure;
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9;            
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; 
  GPIO_Init(GPIOA, &GPIO_InitStructure);
 
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10;           
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING; 
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  GPIO_Init(GPIOA, &GPIO_InitStructure);
 
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
  GPIO_Init(GPIOA, &GPIO_InitStructure);

   NVIC_InitTypeDef sara3;
  sara3.NVIC_IRQChannel = DMA1_Channel1_IRQn;
  sara3.NVIC_IRQChannelPreemptionPriority = 0;
  sara3.NVIC_IRQChannelSubPriority = 0;
  sara3.NVIC_IRQChannelCmd = ENABLE;
  NVIC_Init(&sara3); 
  TIM_TimeBaseInitTypeDef Tim_TimeBaseStructure;
  TIM_TimeBaseStructInit(&Tim_TimeBaseStructure);
  Tim_TimeBaseStructure.TIM_Period = 9000;         
  Tim_TimeBaseStructure.TIM_Prescaler = 0x0;      
  Tim_TimeBaseStructure.TIM_ClockDivision = 0x0;   
  Tim_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; 
  TIM_TimeBaseInit(TIM2, &Tim_TimeBaseStructure);
  TIM_SelectOutputTrigger(TIM2, TIM_TRGOSource_Update);
 
TIM_ITConfig(TIM2, TIM_IT_Update, ENABLE);
 
  /*
  TIM_OCInitTypeDef  TIM_OCInitStructure;
  TIM_OCInitStructure.TIM_OCMode = TIM_OCMode_PWM1;
  TIM_OCInitStructure.TIM_OutputState = TIM_OutputState_Enable;               
  TIM_OCInitStructure.TIM_Pulse = 0x7F;
  TIM_OCInitStructure.TIM_OCPolarity = TIM_OCPolarity_Low;        
  TIM_OC1Init(TIM2, &TIM_OCInitStructure);
  */
   

  ADC_InitTypeDef ADC_InitStructure;
  ADC_InitStructure.ADC_Mode = ADC_Mode_Independent;      
  ADC_InitStructure.ADC_ScanConvMode = DISABLE;              
  ADC_InitStructure.ADC_ContinuousConvMode = ENABLE;     
  ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_T2_CC2; 
  ADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right;             
  ADC_InitStructure.ADC_NbrOfChannel = 1;                      
  ADC_Init(ADC1, &ADC_InitStructure);
 
  ADC_RegularChannelConfig(ADC1, ADC_Channel_1, 1, ADC_SampleTime_55Cycles5);     
                                       
  //ADC_SoftwareStartConvCmd(ADC1,ENABLE);
 
 

 
 

  DMA_DeInit(DMA1_Channel1);
  DMA_InitStructure.DMA_PeripheralBaseAddr = ADC1_DR_Address;
  DMA_InitStructure.DMA_MemoryBaseAddr = (uint32_t)array;
  DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralSRC;
  DMA_InitStructure.DMA_BufferSize = 32;
  DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable;
  DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable;
  DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord;
  DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord;
  DMA_InitStructure.DMA_Mode = DMA_Mode_Normal;
  DMA_InitStructure.DMA_Priority = DMA_Priority_High;
  DMA_InitStructure.DMA_M2M = DMA_M2M_Disable;
  DMA_Init(DMA1_Channel1, &DMA_InitStructure);

    USART_InitTypeDef USART_InitStructure;
  USART_InitStructure.USART_BaudRate = 115200;
  USART_InitStructure.USART_WordLength = USART_WordLength_8b;
  USART_InitStructure.USART_StopBits = USART_StopBits_1;
  USART_InitStructure.USART_Parity = USART_Parity_No;
  USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
  USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;
  USART_Init(USART1, &USART_InitStructure);
  USART_ITConfig(USART1, USART_IT_RXNE, ENABLE);
  USART_ITConfig(USART1, USART_IT_TXE, ENABLE);
  USART_ClearFlag(USART1,USART_FLAG_TC);
 
  DMA_ITConfig (DMA1_Channel1, DMA_IT_TC,ENABLE);
  DMA_Cmd(DMA1_Channel1, ENABLE);

   
  ADC_Cmd(ADC1, ENABLE);
  ADC_DMACmd(ADC1, ENABLE);
  USART_Cmd(USART1, ENABLE);
  TIM_Cmd(TIM2, ENABLE); 
 
 
  ADC_ResetCalibration(ADC1);
  while(ADC_GetResetCalibrationStatus(ADC1));
  ADC_StartCalibration(ADC1);
  while(ADC_GetCalibrationStatus(ADC1));

 
  
   while (1);
  
}



void DMA1_Channel1_IRQHandler(void)
{
 
  uint8_t i = 0;
  if( DMA_GetITStatus(DMA1_FLAG_TC1) )
  {
    for(i = 0;i < 32 ; i++){
     
      USART_SendData(USART1, (uint8_t) array[i]);
      while (USART_GetFlagStatus(USART1, USART_FLAG_TC) == RESET) {}
     
      USART_SendData(USART1, (uint8_t) array[i]>> 8);
      while (USART_GetFlagStatus(USART1, USART_FLAG_TC) == RESET) {}
      }
 
   
  DMA_DeInit(DMA1_Channel1);
  DMA_InitStructure.DMA_PeripheralBaseAddr = ADC1_DR_Address;
  DMA_InitStructure.DMA_MemoryBaseAddr = (uint32_t)array;
  DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralSRC;
  DMA_InitStructure.DMA_BufferSize = 32;
  DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable;
  DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Disable;
  DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord;
  DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord;
  DMA_InitStructure.DMA_Mode = DMA_Mode_Normal;
  DMA_InitStructure.DMA_Priority = DMA_Priority_High;
  DMA_InitStructure.DMA_M2M = DMA_M2M_Disable;
  DMA_Init(DMA1_Channel1, &DMA_InitStructure);
 


  ADC_DMACmd(ADC1, ENABLE);
DMA_Cmd(DMA1_Channel1, ENABLE);

    DMA_ClearITPendingBit(DMA1_IT_TC1);
    DMA_ClearITPendingBit(DMA1_IT_GL1);
  }
}
 
Hi Leily, welcome!
unfortunately i cannot help with your code, usually when i debug i go through step by step and verify each peripheral is working, then after i get all peripherals working i check main code to make sure data is passed properly between, however it may help you more if you "start your own thread" this will likely get you more views and coordinate you better to someone who can help. I m at the stage here where i m just about to ask what i use to compile.

so Questions (anybody!):
1)with these linux devices i have seen java apps for android, which is a layer that goes on top of OS, is this Linux still, or is android different?
2)can i launch a program direct from shell, would it still be considered linux app, what compiler/lang?
3)what compiler/lang for Linux desktop apps?
4)can i replace linux shell with my own firmware for ARM device, what compiler/lang?
5)how do i get linux back on to ARM when i mess up firmware?
6) also do i need to get a arm Microcontroller on blank demo board, or could i flash my cellphone, again what compiler/lang?
 
I'll take a stab at your questions. I am not an expert.

so Questions (anybody!):
1)with these linux devices i have seen java apps for android, which is a layer that goes on top of OS, is this Linux still, or is android different?

java is an interpreted language. You have the "run time" systems which don;t contain the debuggers.
java needed to be totally platform independent, hence you browser runs java. The SAME java as everyone else.
java also had to not have unrestricted system access for browser use.

Look at the wikipedia articles for java and javascript.
Java
https://en.wikipedia.org/wiki/Java_(programming_language)

JavaScript
https://en.wikipedia.org/wiki/JavaScript

2)can i launch a program direct from shell, would it still be considered linux app, what compiler/lang?
I'd say yes. Anything the machine will support.

3)what compiler/lang for Linux desktop apps?

That question I think is loaded. c, Python etc. The BIGGER problem is your GUI support and/or multi-platform support.

4)can i replace linux shell with my own firmware for ARM device, what compiler/lang?

A BIG potential problem might show up here. e.g. Broadcom makes their drivers closed. Once you delve out of the supported OS system, you no longer have high level drivers to support their devices.

The C "printf" is implemented differently in every system, but printf is nearly the same in ANSI c.

Let's go WAY BACK to the birth of unix. The "shell" essentially ended up being a specific terminal interface. e.g. VT100, Hazeltine 1500, Tn3270, X windows. The bash and borne shells are two different shells I know of.

It's also an "environment" . Certain characteristics are defined for everyone. For that matter, if you wanted the shell commands to be DOS like, you could probably make that happen.

5)how do i get linux back on to ARM when i mess up firmware?

With ARM, there is the bootloader, so if something doesn;t happen with the serial port, then the system boots normally.

But let's say we are updating the firmware of a switch or router. The browser could implement say trivial FTP and there could be two firmware images where if the new firmware fails to boot, the last firmware is loaded. A full reset could load the factory firmware.

if this say was a router and the router go bricked using the browser method of updating, one would have to access it at a low level which would likely be the console port of linux amd possibly at a lower level yet or say JTAG/

6) also do i need to get a arm Microcontroller on blank demo board, or could i flash my cellphone, again what compiler/lang?

Can't answer that one.
 
If you root a a android you are unlocking it which lets you use it as a Linux sys. jail break a iphone dose the same for iphone there both able to run Linux
The only difference is more or less how they handle app's.
Rooting them gives you as they say God power to do anything you want so you add the linux development environment package that lets you compile your own programs in C , C++, java ply and so on or use bash scripting.
Most all these arm's running bootloader of some kind I think even grub is now used. A slower uC with a boot loader could boot a Linux kernel that then mounted a SD card and run a small file sys the door would be open for about any thing wifi cable box car computer comes to mind celphone mp3 and on.
 
the door would be open for about any thing wifi cable box car computer comes to mind celphone mp3 and on.

That's exactly why it captures my interest, ima go fetch some recycling and see what damage i can do,
bbs!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top