x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

Renesas code example SH7690 missing defs.h include file

Stevetuc Page Icon Posted 2022-01-27 7:57 AM
#
Avatar image of Stevetuc
Factorite (Junior)

Posts:
38
Location:
United Kingdom
Status:
Hi all

I'm trying to compile the attached Renesas appnote which   changes clockspeed of SH7690

Example of Setting the CPG to Change the Operating Frequency Webpage

The plan is then to adapt the code to the SH7709A

I have installed on WinNT :
Embedded Visual Tools 3.0
HPCPro SDK
Renasas High Performance Embedded Workshop

The Renesas workshop adds include files which cover most of the required ones in the code sample:

 
********************************************************************************  
* Copyright (C) 2007(2010) Renesas Electronics Corporation. All rights reserved.  
*""FILE COMMENT""*********** Technical reference data **************************  
* System Name : SH7671 Sample Program  
* File Name : main.c  
* Abstract : Setting Sample on CPG Operatin Frequency Modification  
* Version : 1.00.01  
* Device : SH7671  
* Tool-Chain : High-performance Embedded Workshop (Ver.4.03.00).  
* : C/C++ compiler package for the SuperH RISC engine family  
* : (Ver.9.01 Release01).  
* OS : None  
* H/W Platform: M3A-HS71(CPU board)  
* Description :  
********************************************************************************  
* History : Jul.05,2007 ver.1.00.00  
* : May 12,2010 ver.1.00.01 Changed the company name and device name  
*""FILE COMMENT END""**********************************************************/  
#include <machine.h>  
#include "iodefine.h"  
#include "defs.h"


So machine.h and iodefine.h are found OK but not defs.h. a complete search of my PC drew a blank.
Does anyone know where I should download the required defs.h?

Thanks
Steve


Edited by Stevetuc 2022-01-27 7:59 AM
 Top of the page
stingraze Page Icon Posted 2022-01-27 8:20 AM
#
Avatar image of stingraze
Subscribers
H/PC Vanguard

Posts:
3,188
Location:
Japan
Status:
I was checking the manual for SH7690, but are you sure the board is compatible with Windows CE (H/PC Pro?)
https://www.renesas.com/us/ja/document/mat/sh7670-cpu-boardm3a-hs71-... says that the board was made in 2007 - 2008.

Platform Builder etc. probably didn't support this hardware unless there are drivers for it?

Also, I never heard of SH-2A series, which the SH7690 is based on, being used with Windows CE (H/PC Pro).

Nevertheless,

asking from here (Japanese page) might help you since it is about Embedded Works which is compatible with M3A-HS71.
https://www.co-nss.co.jp/products/middleware/ew-pack.html


Edited by stingraze 2022-01-27 8:33 AM
 Top of the page
Stevetuc Page Icon Posted 2022-01-27 9:43 AM
#
Avatar image of Stevetuc
Factorite (Junior)

Posts:
38
Location:
United Kingdom
Status:
The appnote is based on SH7690, but with some modifications the code will be applicable to the SH7709A
used in the J690.

Renesas provide a snippet of similar code for the SH7709S here:
http://resource.renesas.com/lib/eng/e_learnig/superh_e_learning/38/index.html
Look in the CPG and WDT section - program to change the clock freq.

So it should be possible to compile code that changes the clock freq of the SH7709A.

I wanted to try the given example for the 7690 first because it's complete so as to test out my toolchain.
It should be fairly simple as it's just targeting the registers that control the onboard clock generators and dividers of the processor and not any features of the board they are using:



I think the defs.h file must be generic but the toolchains I have don't provide it.

I'll take a look at the links you suggested. Thanks.

Edited by Stevetuc 2022-01-27 9:47 AM
 Top of the page
C:Amie Page Icon Posted 2022-01-27 10:29 AM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
16,831
Location:
United Kingdom
Status:
or they're not generic and they're CPU tethered and have to be set manually. From what I can see the defs.h is responsible for storing the click and bus frequency data relating to the processor. So it probably needs to come from somewhere specific to the CPU. Did you do a wildcard search for *defs.h, in case they're sitting there labelled blabla-defs.h?
 Top of the page
Stevetuc Page Icon Posted 2022-01-27 12:47 PM
#
Avatar image of Stevetuc
Factorite (Junior)

Posts:
38
Location:
United Kingdom
Status:
A global search yields APPDEFS.h BLDDEFS.h DBGDEFS.h and TEXTDEFS.h all part of EVC includes.
However, it looks like the example code for SH7709 (the link I posted earlier) and another appnote for the SH7206. SH7206 example set CPG to Change operating Frequency
Don't require defs.h so I can sidestep this issue and work with them instead


Edited by Stevetuc 2022-01-27 12:51 PM
 Top of the page
stingraze Page Icon Posted 2022-01-28 1:48 AM
#
Avatar image of stingraze
Subscribers
H/PC Vanguard

Posts:
3,188
Location:
Japan
Status:
Ah, now I get what you mean.

I never did low-level development with Windows CE, but I hope you can make it work!
Good luck.

If it was for ARM devices, there is CeGCC as a compiler. Maybe it will help you in ARM based devices like Jornada 720, 728 etc. in the future.
http://cegcc.sourceforge.net/docs/using.html


Edited by stingraze 2022-01-28 1:50 AM
 Top of the page
Jump to forum:
Seconds to generate: 0.093 - Cached queries : 64 - Executed queries : 8
Server Time now is: Thursday, 1 December 2022 - 7:59